Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
apt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Qm64
apt
Commits
cc6de125
Unverified
Commit
cc6de125
authored
Apr 21, 2019
by
Lorenzo Setale
⭐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds ipfs-gateway package
parent
87c8c0f6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
176 additions
and
3 deletions
+176
-3
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
makefiles/ipfs-gateway.mk
makefiles/ipfs-gateway.mk
+44
-0
makefiles/ipfs.mk
makefiles/ipfs.mk
+2
-2
source/ipfs-gateway.deb/debian/compat
source/ipfs-gateway.deb/debian/compat
+1
-0
source/ipfs-gateway.deb/debian/ipfs-gateway.init
source/ipfs-gateway.deb/debian/ipfs-gateway.init
+102
-0
source/ipfs-gateway.deb/debian/ipfs-gateway.install
source/ipfs-gateway.deb/debian/ipfs-gateway.install
+0
-0
source/ipfs-gateway.deb/debian/ipfs-gateway.service
source/ipfs-gateway.deb/debian/ipfs-gateway.service
+15
-0
source/ipfs-gateway.deb/debian/rules
source/ipfs-gateway.deb/debian/rules
+11
-0
No files found.
.gitlab-ci.yml
View file @
cc6de125
...
...
@@ -24,7 +24,7 @@ build:ipfs:
-
apt-get install --yes make dh-make gpg apt-utils dpkg-dev curl jq dpkg-sig git-crypt
-
apt-get install --yes ubuntu-dev-tools binutils-arm-linux-gnueabihf
-
dpkg --add-architecture armhf
-
make deb_ipfs_amd64 deb_ipfs_arm deb_ipfs-service
-
make deb_ipfs_amd64 deb_ipfs_arm deb_ipfs-service
deb_ipfs-gateway
artifacts
:
paths
:
-
dist
...
...
makefiles/ipfs-gateway.mk
0 → 100644
View file @
cc6de125
# This file contains quick phony targets to build IPFS packages
IPFS_VERSION
:=
$(
shell
curl
-s
https://dist.ipfs.io/go-ipfs/versions |
tail
-n
1
)
IPFS_PKG_VERSION
:=
$(
shell
echo
${IPFS_VERSION}
|
sed
's/v//'
)
-0
EMAIL
?=
"hello@siderus.io"
DEBFULLNAME
?=
"Siderus OU"
_prepare_ipfs-gateway_deb
:
mkdir
-p
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
cp
-aR
source
/ipfs-gateway.deb/
*
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/
@
echo
"Source: ipfs-gateway"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Section: misc"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Priority: optional"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Maintainer:
${DEBFULLNAME}
<
${EMAIL}
>"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Build-Depends: debhelper (>= 9)"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Standards-Version:
${IPFS_PKG_VERSION}
"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
""
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@echo "Package
:
ipfs-gateway" >> build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/control
@
echo
"Depends: ipfs"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Architecture: all"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
@
echo
"Description: Add system service for IPFS"
>>
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
/debian/control
# Building the changelog
@echo
"ipfs-gateway (${IPFS_PKG_VERSION}) internal; urgency=low"
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
@echo
" "
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
@echo
" This package has been built by Siderus using an automation pipeline. Please"
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
@echo
" refer to the official go-ipfs changelog for more information"
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
@echo
" "
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
@echo
" -- ${DEBFULLNAME} <${EMAIL}> $(shell date -R)"
>>
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/changelog
chmod
+x
build/deb/all/ipfs-gateway-${IPFS_PKG_VERSION}/debian/rules
.PHONY
:
_prepare_ipfs-gateway_deb
_build_ipfs-gateway_deb_package
:
_prepare_ipfs-gateway_deb
cd
build/deb/all/ipfs-gateway-
${IPFS_PKG_VERSION}
;
\
dpkg-buildpackage
-us
-uc
-d
.PHONY
:
ipfs_deb_package
deb_ipfs-gateway
:
$(MAKE)
clean_build
\
_prepare_ipfs-gateway_deb _build_ipfs-gateway_deb_package
\
collect_deb_packages
\ No newline at end of file
makefiles/ipfs.mk
View file @
cc6de125
...
...
@@ -11,7 +11,7 @@ ifeq ($(ARCH),arm)
endif
IPFS_VERSION
:=
$(
shell
curl
-s
https://dist.ipfs.io/go-ipfs/versions |
grep
-v
"rc"
|
tail
-n
1
)
IPFS_PKG_VERSION
:=
$(
shell
echo
${IPFS_VERSION}
|
sed
's/v//'
)
-
2
IPFS_PKG_VERSION
:=
$(
shell
echo
${IPFS_VERSION}
|
sed
's/v//'
)
-
0
EMAIL
?=
"hello@siderus.io"
DEBFULLNAME
?=
"Siderus OU"
...
...
@@ -48,7 +48,7 @@ _prepare_ipfs_deb: _unpack_ipfs
@
echo
" simple as the HTTP web, but with permanence built in."
>>
build/deb/
${DEB_ARCH}
/ipfs-
${IPFS_PKG_VERSION}
/debian/control
@
echo
" You can also mount the world at /ipfs."
>>
build/deb/
${DEB_ARCH}
/ipfs-
${IPFS_PKG_VERSION}
/debian/control
@
echo
" This package is maintained and distributed by Siderus."
>>
build/deb/
${DEB_ARCH}
/ipfs-
${IPFS_PKG_VERSION}
/debian/control
# Building the changelog
@echo
"ipfs (${IPFS_PKG_VERSION}) internal; urgency=low"
>>
build/deb/${DEB_ARCH}/ipfs-${IPFS_PKG_VERSION}/debian/changelog
@echo
" "
>>
build/deb/${DEB_ARCH}/ipfs-${IPFS_PKG_VERSION}/debian/changelog
...
...
source/ipfs-gateway.deb/debian/compat
0 → 100644
View file @
cc6de125
9
source/ipfs-gateway.deb/debian/ipfs-gateway.init
0 → 100644
View file @
cc6de125
#!/bin/sh
### BEGIN INIT INFO
# Provides: ipfs-gateway
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts ipfs daemon
# Description: starts go-ipfs daemon using start-stop-daemon
### END INIT INFO
PATH
=
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON
=
/usr/bin/ipfs
PIDFILE
=
/var/run/ipfs-gateway.pid
NAME
=
ipfs
DESC
=
ipfs
DAEMON_OPTS
=
daemon
--init
--migrate
--enable-gc
--enable-pubsub-experiment
--enable-namesys-pubsub
# Include ipfs defaults if available
if
[
-r
/etc/default/ipfs
]
;
then
.
/etc/default/ipfs
fi
test
-x
$DAEMON
||
exit
0
.
/lib/init/vars.sh
.
/lib/lsb/init-functions
start_ipfs
()
{
# Start the daemon/service
#
# Returns:
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
$DAEMON
--test
>
/dev/null
\
||
return
1
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
$DAEMON
--
\
$DAEMON_OPTS
2>/dev/null
\
||
return
2
}
stop_ipfs
()
{
# Stops the daemon/service
#
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon
--stop
--quiet
--pidfile
$PIDFILE
--name
$NAME
RETVAL
=
"
$?
"
sleep
1
return
"
$RETVAL
"
}
case
"
$1
"
in
start
)
log_daemon_msg
"Starting
$DESC
"
"
$NAME
"
start_ipfs
case
"
$?
"
in
0|1
)
log_end_msg 0
;;
2
)
log_end_msg 1
;;
esac
;;
stop
)
log_daemon_msg
"Stopping
$DESC
"
"
$NAME
"
stop_ipfs
case
"
$?
"
in
0|1
)
log_end_msg 0
;;
2
)
log_end_msg 1
;;
esac
;;
restart
)
log_daemon_msg
"Restarting
$DESC
"
"
$NAME
"
stop_ipfs
case
"
$?
"
in
0|1
)
start_ipfs
case
"
$?
"
in
0
)
log_end_msg 0
;;
1
)
log_end_msg 1
;;
# Old process is still running
*
)
log_end_msg 1
;;
# Failed to start
esac
;;
*
)
# Failed to stop
log_end_msg 1
;;
esac
;;
status
)
status_of_proc
-p
$PIDFILE
"
$DAEMON
"
"
$NAME
"
&&
exit
0
||
exit
$?
;;
*
)
echo
"Usage:
$NAME
{start|stop|restart|status}"
>
&2
exit
3
;;
esac
\ No newline at end of file
source/ipfs-gateway.deb/debian/ipfs-gateway.install
0 → 100644
View file @
cc6de125
source/ipfs-gateway.deb/debian/ipfs-gateway.service
0 → 100644
View file @
cc6de125
[Unit]
Description
=
IPFS Daemon for the System by Siderus
Wants
=
network.target
After
=
network.target
[Service]
Type
=
simple
Environment
=
IPFS_PATH=/var/ipfs/
ExecStart
=
/usr/bin/ipfs daemon --init --migrate --enable-gc --enable-pubsub-experiment --enable-namesys-pubsub
ExecStop
=
/usr/bin/pkill -f ipfs
Restart
=
on-failure
RestartSec
=
10s
[Install]
WantedBy
=
multi-user.target
\ No newline at end of file
source/ipfs-gateway.deb/debian/rules
0 → 100644
View file @
cc6de125
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_build:
override_dh_auto_install:
override_dh_systemd_enable:
dh_systemd_enable --name=ipfs-gateway
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment