Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpm dependency removed #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions DEBIAN.urepo-uploader/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Package: urepo-uploader
Version: 2.0.0
Architecture: amd64
Section: default
Priority: extra
Maintainer: Hulu
Description: Uploading tool for urepo (universal repository for linux binary packages)
8 changes: 8 additions & 0 deletions DEBIAN.urepo/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: urepo
Version: 2.2.3
Architecture: amd64
Depends: nginx, fcgiwrap, createrepo
Section: default
Priority: extra
Maintainer: Hulu
Description: Universal repository for linux binary packages
File renamed without changes.
File renamed without changes.
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Drawbacks of current system:
## Building urepo

Currently urepo can be installed **only** on Ubuntu or other Debian derivatives.
Urepo build relies on the ```dpkg-deb``` option ```--root-owner-group``` and will fail if your version of ```dpkg-deb``` doesn't support this option.

### Requirements

Expand All @@ -50,10 +51,6 @@ First you'll need to install a few packages to correctly build:
apt install git build-essential nginx fcgiwrap createrepo
```

#### Install FPM

Urepo requires fpm to run correctly, please do follow the [installation](http://fpm.readthedocs.io/en/latest/installing.html) process before to proceed.

### Download urepo

Time to download urepo, follow these steps:
Expand Down Expand Up @@ -84,26 +81,33 @@ We don't cover other parameters since they are more easy to change, for example
Now you can build your urepo as follow:

```
make pkg
make
```

If all goes well, it should tell you something like this:

```
gcc -Wall -O2 -o extract-post-file extract-post-file.c
mkdir build
test/run-test.sh
001-1kb-test ok
002-empty-test ok
003-text-test ok
004-1kb-text-test ok
005-text-1kb-test ok
007-1kb-field-test ok
008-field-1kb-field-test ok
009-1kb-field-text-test ok
010-field-1kb-field-text-field-test ok
Summary: 9 tests passed, 0 tests failed
mkdir -p build
rm -rf build/*
cp -r {var,etc} build/
cp -r DEBIAN.urepo build/DEBIAN
cp extract-post-file build/var/urepo/cgi
cd build && \
fpm --deb-user root --deb-group root \
-d nginx -d fcgiwrap -d createrepo \
--deb-no-default-config-files \
--description "Universal repository for linux binary packages" \
--after-install ../after-install.sh \
--before-remove ../before-remove.sh \
-s dir -t deb -v 2.1.2 -n urepo `find . -type f` && \
rm -rf `ls|grep -v deb$`
Created package {:path=>"urepo_2.1.2_amd64.deb"}
chmod -R go-w build
. <(grep -E "^(Package|Version|Architecture):" build/DEBIAN/control |sed -e 's/: \(.*\)/="\1"/') && \
dpkg-deb --root-owner-group -b ./build ${Package}_${Version}_${Architecture}.deb
dpkg-deb: building package 'urepo' in 'urepo_2.2.3_amd64.deb'.
```

If you have the following error message:
Expand Down
15 changes: 0 additions & 15 deletions build-urepo-uploader.sh

This file was deleted.

30 changes: 15 additions & 15 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
PKG_NAME=urepo
PKG_VERSION=2.2.3
PKG_DESCRIPTION="Universal repository for linux binary packages"

.PHONY: all
SHELL=/bin/bash

all: pkg
bin:
gcc -Wall -O2 -o extract-post-file extract-post-file.c
clean:
rm -rf extract-post-file build
rm -rf extract-post-file build *.deb
test: bin
test/run-test.sh
pkg: test
mkdir build
mkdir -p build
rm -rf build/*
cp -r {var,etc} build/
cp -r DEBIAN.urepo build/DEBIAN
cp extract-post-file build/var/urepo/cgi
cd build && \
fpm --deb-user root --deb-group root \
-d nginx -d fcgiwrap -d createrepo \
--deb-no-default-config-files \
--description $(PKG_DESCRIPTION) \
--after-install ../after-install.sh \
--before-remove ../before-remove.sh \
-s dir -t deb -v $(PKG_VERSION) -n $(PKG_NAME) `find . -type f` && \
find . ! -name '*.deb' -delete
chmod -R go-w build
. <(grep -E "^(Package|Version|Architecture):" build/DEBIAN/control |sed -e 's/: \(.*\)/="\1"/') && \
dpkg-deb --root-owner-group -b ./build $${Package}_$${Version}_$${Architecture}.deb
uploader:
mkdir -p build
rm -rf build/*
cp -r usr build/
cp -r DEBIAN.urepo-uploader build/DEBIAN
chmod -R go-w build
. <(grep -E "^(Package|Version|Architecture):" build/DEBIAN/control |sed -e 's/: \(.*\)/="\1"/') && \
dpkg-deb --root-owner-group -b ./build $${Package}_$${Version}_$${Architecture}.deb