packaging issues: some serious, some not so serious

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  there are a few bugs in the packaging targets, both with local
packaging and remote packaging if you've used "O=" for your kernel
build.  first, let's consider local builds.

  consider the packaging makefile scripts/package/Makefile.  these
early lines look entirely superfluous (nothing uses the variable
TAR_IGNORE):

...
# Ignore the following files/directories during tar operation
TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS
...

  next, related to my earlier email, if your kernel source happens to
be in its own filesystem so that there's a "lost+found" directory, any
"tar" operation is going to fail due to lack of permissions for that
directory:

$ make rpm-pkg
...
find: ./lost+found: Permission denied
...
tar: kernel-2.6.25rc200015g1309d4e/./lost+found: Cannot open:
Permission denied
tar: Error exit delayed from previous errors
make[1]: *** [rpm-pkg] Error 2
make: *** [rpm-pkg] Error 2
$

  it seems to be sufficient to apply the following patch:

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 5e32607..d3307f1 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -39,7 +39,7 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
 rpm-pkg rpm: $(objtree)/kernel.spec FORCE
        $(MAKE) clean
        $(PREV) ln -sf $(srctree) $(KERNELPATH)
-       $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
+       $(PREV) tar -cz --exclude lost+found $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
        $(PREV) rm $(KERNELPATH)

        set -e; \


but it's probable that a number of other operations need to take a
"lost+found" directory into account; that is, anything involving
"tar".

  observations on remote packaging to come.

rday
--


========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux