[Reproducible-commits] [koji] 04/05: Add patches fixing lintian warnings
Ximin Luo
infinity0 at debian.org
Fri Dec 4 10:24:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository koji.
commit 633fe7edb269211d70c7d24280c3af0a74045e82
Author: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
Date: Thu Dec 3 11:42:32 2015 +0100
Add patches fixing lintian warnings
---
debian/koji-servers.install | 2 +-
...Fail-the-build-when-pkg-config-is-missing.patch | 73 ++++++++++++++++++++++
...-from-usr-libexec-to-usr-lib-koji-libexec.patch | 53 ++++++++++++++++
.../patches/0003-Make-kojikamid-executable.patch | 17 +++++
debian/patches/series | 3 +
5 files changed, 147 insertions(+), 1 deletion(-)
diff --git a/debian/koji-servers.install b/debian/koji-servers.install
index cd8d52d..5d9746a 100644
--- a/debian/koji-servers.install
+++ b/debian/koji-servers.install
@@ -1,6 +1,6 @@
/lib/systemd/system/
/usr/lib/koji-hub-plugins/
-/usr/libexec
+/usr/lib/koji/libexec
/usr/sbin
/etc/kojivmd/
/etc/httpd/
diff --git a/debian/patches/0001-Fail-the-build-when-pkg-config-is-missing.patch b/debian/patches/0001-Fail-the-build-when-pkg-config-is-missing.patch
new file mode 100644
index 0000000..c6f34ec
--- /dev/null
+++ b/debian/patches/0001-Fail-the-build-when-pkg-config-is-missing.patch
@@ -0,0 +1,73 @@
+Description: Fail the build when pkg-config is missing or fails
+ This prevents systemd service files being accidentally installed to /
+Author: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,7 @@
+ NAME=koji
+ SPECFILE = $(firstword $(wildcard *.spec))
+ SUBDIRS = hub builder koji cli docs util www plugins vm
++SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
+
+ ifdef DIST
+ DIST_DEFINES := --define "dist $(DIST)"
+@@ -116,4 +117,5 @@
+ mkdir -p $(DESTDIR)
+
+ for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` \
+- -C $$d install TYPE=$(TYPE); [ $$? = 0 ] || exit 1; done
++ -C $$d install SYSTEMDSYSTEMUNITDIR=$(SYSTEMDSYSTEMUNITDIR) \
++ TYPE=$(TYPE); [ $$? = 0 ] || exit 1; done
+--- a/builder/Makefile
++++ b/builder/Makefile
+@@ -1,6 +1,5 @@
+ BINFILES = kojid
+ LIBEXECFILES = mergerepos
+-SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
+ TYPE = systemd
+
+ _default:
+@@ -29,6 +28,7 @@
+ install -p -m 644 kojid.conf $(DESTDIR)/etc/kojid/kojid.conf
+
+ install-systemd: _install
++ test -n $(SYSTEMDSYSTEMUNITDIR)
+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+ install -p -m 644 kojid.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -1,5 +1,4 @@
+ BINFILES = kojira koji-gc koji-shadow
+-SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
+ TYPE = systemd
+
+ _default:
+@@ -27,6 +26,7 @@
+ install -p -m 644 koji-shadow.conf $(DESTDIR)/etc/koji-shadow/koji-shadow.conf
+
+ install-systemd: _install
++ test -n $(SYSTEMDSYSTEMUNITDIR)
+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+ install -p -m 644 kojira.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+
+--- a/vm/Makefile
++++ b/vm/Makefile
+@@ -1,6 +1,5 @@
+ BINFILES = kojivmd
+ SHAREFILES = kojikamid
+-SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
+ TYPE = systemd
+
+ _default:
+@@ -29,6 +28,7 @@
+ install -p -m 644 kojivmd.conf $(DESTDIR)/etc/kojivmd/kojivmd.conf
+
+ install-systemd: _install
++ test -n $(SYSTEMDSYSTEMUNITDIR)
+ mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+ install -p -m 644 kojivmd.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
+
diff --git a/debian/patches/0002-Move-files-from-usr-libexec-to-usr-lib-koji-libexec.patch b/debian/patches/0002-Move-files-from-usr-libexec-to-usr-lib-koji-libexec.patch
new file mode 100644
index 0000000..6f0b279
--- /dev/null
+++ b/debian/patches/0002-Move-files-from-usr-libexec-to-usr-lib-koji-libexec.patch
@@ -0,0 +1,53 @@
+Description: Use Debian FHS paths
+Author: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/builder/Makefile
++++ b/builder/Makefile
+@@ -19,8 +19,8 @@
+ mkdir -p $(DESTDIR)/usr/sbin
+ install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
+
+- mkdir -p $(DESTDIR)/usr/libexec/kojid
+- install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/kojid
++ mkdir -p $(DESTDIR)/usr/lib/koji/libexec/kojid
++ install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/lib/koji/libexec/kojid
+
+ mkdir -p $(DESTDIR)/etc/mock/koji
+
+--- a/builder/kojid
++++ b/builder/kojid
+@@ -4315,7 +4315,7 @@
+ repos.append(ext_url)
+
+ blocklist = self.repodir + '/blocklist'
+- cmd = ['/usr/libexec/kojid/mergerepos', '-a', arch, '-b', blocklist, '-o', self.outdir]
++ cmd = ['/usr/lib/koji/libexec/kojid/mergerepos', '-a', arch, '-b', blocklist, '-o', self.outdir]
+ if os.path.isfile(groupdata):
+ cmd.extend(['-g', groupdata])
+ for repo in repos:
+--- a/hub/Makefile
++++ b/hub/Makefile
+@@ -23,8 +23,8 @@
+ exit 1; \
+ fi
+
+- mkdir -p $(DESTDIR)/usr/libexec/koji-hub
+- install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/koji-hub
++ mkdir -p $(DESTDIR)/usr/lib/koji/libexec/koji-hub
++ install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/lib/koji/libexec/koji-hub
+
+ mkdir -p $(DESTDIR)/etc/httpd/conf.d
+ install -p -m 644 httpd.conf $(DESTDIR)/etc/httpd/conf.d/kojihub.conf
+--- a/hub/kojihub.py
++++ b/hub/kojihub.py
+@@ -7061,7 +7061,7 @@
+ # ignore differences in file size, md5sum, and mtime
+ # (files may have been generated at build time and contain
+ # embedded dates or other insignificant differences)
+- args = ['/usr/libexec/koji-hub/rpmdiff',
++ args = ['/usr/lib/koji/libexec/koji-hub/rpmdiff',
+ '--ignore', 'S', '--ignore', '5',
+ '--ignore', 'T',
+ os.path.join(basepath, first_rpm),
diff --git a/debian/patches/0003-Make-kojikamid-executable.patch b/debian/patches/0003-Make-kojikamid-executable.patch
new file mode 100644
index 0000000..e701795
--- /dev/null
+++ b/debian/patches/0003-Make-kojikamid-executable.patch
@@ -0,0 +1,17 @@
+Description: Make kojikamid executable
+ Files with a shebang are meant to be executed directly.
+Author: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/vm/Makefile
++++ b/vm/Makefile
+@@ -22,7 +22,7 @@
+ install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
+
+ mkdir -p $(DESTDIR)/usr/share/kojivmd
+- install -p -m 644 $(SHAREFILES) $(DESTDIR)/usr/share/kojivmd
++ install -p -m 755 $(SHAREFILES) $(DESTDIR)/usr/share/kojivmd
+
+ mkdir -p $(DESTDIR)/etc/kojivmd
+ install -p -m 644 kojivmd.conf $(DESTDIR)/etc/kojivmd/kojivmd.conf
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f3cf4e4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Fail-the-build-when-pkg-config-is-missing.patch
+0002-Move-files-from-usr-libexec-to-usr-lib-koji-libexec.patch
+0003-Make-kojikamid-executable.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/koji.git
More information about the Reproducible-commits
mailing list