From 018ae78e49533e0223acdb651657b2c2926f5869 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 17 Apr 2000 07:40:13 +0000 Subject: [PATCH] * TODO: updated * debian/rules: explicitly strip the setgid bit for debian/tmp-*. This is needed since the kernel copies it when we create subdirs and install doesn't strip it even though we explicitly ask for a mode 755 directory. Updated clean target to run make distclean to remove generated sourcefiles as well. * dpkg-deb/build.c: add comments to describe what we are doing. Add code to get a list of files to be added to the archive, reorder it and feed it to tar and use this to put symlinks after all other files. * scripts/dpkg-gencontrol.pl: add dpkg:Version and dpkg:UpstreamVersion to list of substvars --- ChangeLog | 15 ++ TODO | 13 ++ debian/changelog | 5 +- debian/rules | 7 + dpkg-deb/build.c | 164 ++++++++++++++++++++- po/dpkg.pot | 283 +++++++++++++++++++------------------ scripts/dpkg-gencontrol.pl | 4 + 7 files changed, 348 insertions(+), 143 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f01da39..f66bddb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Sat Apr 15 14:53:23 EDT 2000 Wichert Akkerman + + * TODO: updated + * debian/rules: explicitly strip the setgid bit for debian/tmp-*. + This is needed since the kernel copies it when we create subdirs + and install doesn't strip it even though we explicitly ask for + a mode 755 directory. Updated clean target to run make distclean + to remove generated sourcefiles as well. + * dpkg-deb/build.c: add comments to describe what we are doing. + Add code to get a list of files to be added to the archive, reorder + it and feed it to tar and use this to put symlinks after all other + files. + * scripts/dpkg-gencontrol.pl: add dpkg:Version and dpkg:UpstreamVersion + to list of substvars + Thu Apr 13 09:57:52 EDT 2000 Wichert Akkerman * configure.in: add -D_GNU_SOURCE to CFLAGS so we can get strsignal diff --git a/TODO b/TODO index e62f1958..55d9a5f8 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,8 @@ +libdpkg: +* cut compat.c into little pieces and move them to optlib + +optlib: +* add fnmatch, IRIX5 doesn't have it start-stop-daemon * write pidfile before we chroot? @@ -10,6 +15,14 @@ dpkg * allow external program to specify how to handle conffiles * integrate suidmanager * log our actions +* try to remove directories again after removing conffiles +* allow versioned provides +* verify Enhances works (ie don't trigger some assertion) + +dselect: +* support Enhances (GNU/FSF) +* allow versioned provides +* toggle for searching through descriptions dpkg-source * update format to handle multiple patches and tarballs diff --git a/debian/changelog b/debian/changelog index 878be7a6..4fd75808 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,12 +3,13 @@ dpkg (1.7.0) unstable; urgency=low * Use objdump instead of ldd in dpkg-shlibdeps * HURD updates, Closes: Bug#57753,#57754,#57755 * dpkg-architecture: -q should not imply -f, Closes: Bug#57761 - * add dpkg:UpstreamVersion and dpkg:Version substvars in dpkg-genchanges. - Closes: Bug#62069 + * add dpkg:UpstreamVersion and dpkg:Version substvars in dpkg-genchanges + and dpkg-gencontrol. Closes: Bug#62069 * dpkg-genchanges: add new Changed-By field to .changes with the last person who made a change, and modify the Maintainer-field to be the actual maintainer. Update the format-version to 1.7 to reflect this. * dpkg-genchanges: allow a space between # and a to-be-closed bugnumber + * dpkg-deb: reorder files when building a package -- Wichert Akkerman UNRELEASED diff --git a/debian/rules b/debian/rules index 413b9630..22a144dd 100755 --- a/debian/rules +++ b/debian/rules @@ -37,6 +37,7 @@ $(BUILD)/config.status: clean: $(checkdir) + $(MAKE) $(MFLAGS) -C $(BUILD) distclean rm -f debian/files debian/substvars rm -f debian/dpkg.substvars rm -fr $(BUILD) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC) @@ -69,6 +70,8 @@ stamp-binary: stamp-build binary-dpkg: stamp-binary rm -rf $(TMP_DPKG) + install -d -m 755 -o root -g root $(TMP_DPKG) + chmod g-s $(TMP_DPKG) install -d -m 755 -o root -g root $(TMP_DPKG)/usr/share/doc/dpkg install -d -m 755 -o root -g root $(TMP_DPKG)/usr/lib/dpkg install -d -m 755 -o root -g root $(TMP_DPKG)/usr/bin @@ -130,6 +133,8 @@ binary-dpkg: stamp-binary binary-dpkg-dev: stamp-binary rm -rf $(TMP_DPKG_DEV) + install -d -m 755 -o root -g root $(TMP_DPKG_DEV) + chmod g-s $(TMP_DPKG_DEV) install -d -m 755 -o root -g root $(TMP_DPKG_DEV)/usr/lib/dpkg install -d -m 755 -o root -g root $(TMP_DPKG_DEV)/usr/share install -d -m 755 -o root -g root $(TMP_DPKG_DEV)/usr/bin @@ -186,6 +191,8 @@ binary-dpkg-dev: stamp-binary binary-dpkg-doc: stamp-binary rm -rf $(TMP_DPKG_DOC) + install -d -m 755 -o root -g root $(TMP_DPKG_DOC) + chmod g-s $(TMP_DPKG_DOC) install -d -m 755 -o root -g root $(TMP_DPKG_DOC)/usr/share/doc/dpkg mv $(TMP)/usr/share/doc/dpkg/internals $(TMP_DPKG_DOC)/usr/share/doc/dpkg/ mv $(TMP)/usr/share/doc/dpkg/ChangeLog.manuals \ diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index 79c0d1d2..024a6e4a 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -3,6 +3,7 @@ * build.c - building archives * * Copyright (C) 1994,1995 Ian Jackson + * Copyright (C) 2000 Wichert Akkerman * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -43,6 +44,18 @@ # define S_ISLNK(mode) ((mode&0xF000) == S_IFLNK) #endif +/* Simple structure to store information about a file. + */ +struct _finfo { + struct stat st; + char* fn; + struct _finfo* next; +}; + +/* Do a quick check if vstring is a valid versionnumber. Valid in this case + * means it contains at least one digit. If an error is found increment + * *errs. + */ static void checkversion(const char *vstring, const char *valuename, int *errs) { const char *p; if (!vstring || !*vstring) return; @@ -52,6 +65,84 @@ static void checkversion(const char *vstring, const char *valuename, int *errs) (*errs)++; } +/* Read the next filename from a filedescriptor and create a _info struct + * for it. If there is nothing to read return NULL. + */ +static struct _finfo* getfi(const char* root, int fd) { + static char* fn = NULL; + static int fnlen = 0; + int i = 0; + struct _finfo *fi; + size_t rl = strlen(root); + + if (fn == NULL) { + fnlen=rl+2048; + fn=(char*)malloc(fnlen); + } else if (fnlen < (rl+2048)) { + fnlen=rl+2048; + fn=(char*)realloc(fn,fnlen); + } + i=sprintf(fn,"%s/",root); + + while (1) { + int res; + if (i>=fnlen) { + fnlen+=2048; + fn=(char*)realloc(fn,fnlen); + } + if ((res=read(fd, (fn+i), sizeof(*fn)))<0) { + if ((errno==EINTR) || (errno==EAGAIN)) + continue; + else + return NULL; + } + if (res==0) // EOF -> parent died + return NULL; + if (fn[i]==0) + break; + + i++; + assert(i<2048); + } + + fi=(struct _finfo*)malloc(sizeof(struct _finfo)); + lstat(fn, &(fi->st)); + fi->fn=strdup(fn+rl+1); + fi->next=NULL; + return fi; +} + +/* Add a new _finfo struct to a single linked list of _finfo structs. + * We perform a slight optimization to work around a `feature' in tar: tar + * always recurses into subdirectories if you list a subdirectory. So if an + * entry is added and the previous entry in the list is its subdirectory we + * remove the subdirectory. + * + * After a _finfo struct is added to a list it may no longer be freed, we + * assume full responsibility for its memory. + */ +static void add_to_filist(struct _finfo* fi, struct _finfo** start, struct _finfo **end) { + if (*start==NULL) + *start=*end=fi; + else + *end=(*end)->next=fi; + } +} + +/* Free the memory for all entries in a list of _finfo structs + */ +static void free_filist(struct _finfo* fi) { + while (fi) { + struct _finfo* fl; + free(fi->fn); + fl=fi; fi=fi->next; + free(fl); + } +} + + +/* Overly complex function that builds a .deb file + */ void do_build(const char *const *argv) { static const char *const maintainerscripts[]= { PREINSTFILE, POSTINSTFILE, PRERMFILE, POSTRMFILE, 0 @@ -68,7 +159,13 @@ void do_build(const char *const *argv) { struct stat controlstab, datastab, mscriptstab, debarstab; char conffilename[MAXCONFFILENAME+1]; time_t thetime= 0; + struct _finfo *fi; + struct _finfo *nosymlist = NULL; + struct _finfo *nosymlist_end = NULL; + struct _finfo *symlist = NULL; + struct _finfo *symlist_end = NULL; +/* Decode our arguments */ directory= *argv++; if (!directory) badusage(_("--build needs a directory argument")); /* template for our tempfiles */ if ((envbuf= getenv("TMPDIR")) == NULL) @@ -93,6 +190,8 @@ void do_build(const char *const *argv) { debar= m; } + /* Perform some sanity checks on the to-be-build package. + */ if (nocheckflag) { if (subdir) ohshit(_("target is directory - cannot skip control file check")); @@ -104,6 +203,7 @@ void do_build(const char *const *argv) { sizeof(POSTINSTFILE) + sizeof(PREINSTFILE) + sizeof(POSTRMFILE) + sizeof(PRERMFILE) + MAXCONFFILENAME + 5); + /* Lets start by reading in the control-file so we can check its contents */ strcpy(controlfile, directory); strcat(controlfile, "/" BUILDCONTROLDIR "/" CONTROLFILE); warns= 0; errs= 0; @@ -139,6 +239,7 @@ void do_build(const char *const *argv) { } printf(_("dpkg-deb: building package `%s' in `%s'.\n"), checkedinfo->name, debar); + /* Check file permissions */ strcpy(controlfile, directory); strcat(controlfile, "/" BUILDCONTROLDIR "/"); if (lstat(controlfile,&mscriptstab)) ohshite("unable to stat control directory"); @@ -165,6 +266,7 @@ void do_build(const char *const *argv) { } } + /* Check if conffiles contains sane information */ strcpy(controlfile, directory); strcat(controlfile, "/" BUILDCONTROLDIR "/" CONFFILESFILE); if ((cf= fopen(controlfile,"r"))) { @@ -205,8 +307,12 @@ void do_build(const char *const *argv) { } if (ferror(stdout)) werr("stdout"); + /* Now that we have verified everything its time to actually + * build something. Lets start by making the ar-wrapper. + */ if (!(ar=fopen(debar,"wb"))) ohshite(_("unable to create `%.255s'"),debar); if (setvbuf(ar, 0, _IONBF, 0)) ohshite(_("unable to unbuffer `%.255s'"),debar); + /* Fork a tar to package the control-section of the package */ m_pipe(p1); if (!(c1= m_fork())) { m_dup2(p1[1],1); close(p1[0]); close(p1[1]); @@ -215,6 +321,9 @@ void do_build(const char *const *argv) { execlp(TAR,"tar","-cf","-",".",(char*)0); ohshite(_("failed to exec tar -cf")); } close(p1[1]); + /* Create a temporary file to store the control data in. Immediately unlink + * our temporary file so others can't mess with it. + */ if ((gzfd= mkstemp(tfbuf)) == -1) ohshite(_("failed to make tmpfile (control)")); if ((gz= fdopen(gzfd,"a")) == NULL) ohshite(_("failed to open tmpfile " "(control), %s"), tfbuf); @@ -224,6 +333,7 @@ void do_build(const char *const *argv) { /* reset this, so we can use it elsewhere */ strcpy(tfbuf,envbuf); strcat(tfbuf,"/dpkg.XXXXXX"); + /* And run gzip to compress our control archive */ if (!(c2= m_fork())) { m_dup2(p1[0],0); m_dup2(gzfd,1); close(p1[0]); execlp(GZIP,"gzip","-9c",(char*)0); ohshite(_("failed to exec gzip -9c")); @@ -232,6 +342,9 @@ void do_build(const char *const *argv) { waitsubproc(c2,"gzip -9c",0); waitsubproc(c1,"tar -cf",0); if (fstat(gzfd,&controlstab)) ohshite(_("failed to fstat tmpfile (control)")); + /* We have our first file for the ar-archive. Write a header for it to the + * package and insert it. + */ if (oldformatflag) { if (fprintf(ar, "%-8s\n%ld\n", OLDARCHIVEVERSION, (long)controlstab.st_size) == EOF) werr(debar); @@ -254,6 +367,9 @@ void do_build(const char *const *argv) { if (lseek(gzfd,0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (control)")); do_fd_copy(gzfd, fileno(ar), _("control")); + /* Control is done, now we need to archive the data. Start by creating + * a new temporary file. Immediately unlink the temporary file so others + * can't mess with it. */ if (!oldformatflag) { fclose(gz); if ((gzfd= mkstemp(tfbuf)) == -1) ohshite(_("failed to make tmpfile (data)")); @@ -266,16 +382,42 @@ void do_build(const char *const *argv) { strcpy(tfbuf,envbuf); strcat(tfbuf,"/dpkg.XXXXXX"); } + /* We need to reorder the files so we can make sure that symlinks + * will not appear before their target. + */ + m_pipe(p2); + if (!(c4= m_fork())) { + m_dup2(p2[1],1); close(p2[0]); close(p2[1]); + if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory); + execlp(FIND,"find",".","-path","./" BUILDCONTROLDIR,"-prune","-o","-print0",(char*)0); + ohshite(_("failed to exec find")); + } + close(p2[1]); + while ((fi=getfi(directory, p2[0]))!=NULL) + if (S_ISLNK(fi->st.st_mode)) + add_to_filist(fi,&symlist,&symlist_end); + else + add_to_filist(fi,&nosymlist,&nosymlist_end); + close(p2[0]); + waitsubproc(c4,"find",0); + + /* Fork off a tar. We will feed it a list of filenames on stdin later. + */ + m_pipe(p1); m_pipe(p2); if (!(c4= m_fork())) { + m_dup2(p1[0],0); close(p1[0]); close(p1[1]); m_dup2(p2[1],1); close(p2[0]); close(p2[1]); if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory); - execlp(TAR,"tar","--exclude",BUILDCONTROLDIR,"-cf","-",".",(char*)0); - ohshite(_("failed to exec tar --exclude")); + execlp(TAR,"tar","-cf", "-", "-T", "-", "--null", "--no-recursion", (char*)0); + ohshite(_("failed to exec tar -cf")); } + close(p1[0]); close(p2[1]); + /* Of course we should not forget to compress the archive as well.. */ if (!(c5= m_fork())) { char *combuf; + close(p1[1]); m_dup2(p2[0],0); close(p2[0]); m_dup2(oldformatflag ? fileno(ar) : gzfd,1); combuf = strdup("-9c"); @@ -287,11 +429,23 @@ void do_build(const char *const *argv) { combuf[1] = *compression; } execlp(GZIP,"gzip",combuf,(char*)0); - ohshite(_("failed to exec gzip %s from tar --exclude"), combuf); + ohshite(_("failed to exec gzip %s from tar -cf"), combuf); } close(p2[0]); - waitsubproc(c5,"gzip -9c from tar --exclude",0); - waitsubproc(c4,"tar --exclude",0); + /* All the pipes are set, lets feed tar its filenames */ + for (fi= nosymlist;fi;fi= fi->next) + if (write(p1[1], fi->fn, strlen(fi->fn)+1) ==- 1) + ohshite(_("failed to write filename to tar pipe (data)")); + for (fi= symlist;fi;fi= fi->next) + if (write(p1[1], fi->fn, strlen(fi->fn)+1) == -1) + ohshite(_("failed to write filename to tar pipe (data)")); + /* All done, clean up wait for tar and gzip to finish their job */ + close(p1[1]); + free_filist(nosymlist); + free_filist(symlist); + waitsubproc(c5,"gzip -9c from tar -cf",0); + waitsubproc(c4,"tar -cf",0); + /* Okay, we have data.tar.gz as well now, add it to the ar wrapper */ if (!oldformatflag) { if (fstat(gzfd,&datastab)) ohshite("_(failed to fstat tmpfile (data))"); if (fprintf(ar, diff --git a/po/dpkg.pot b/po/dpkg.pot index ad91fe2f..ff312d69 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-03-10 14:24+1100\n" +"POT-Creation-Date: 2000-04-15 15:18-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2102,7 +2102,7 @@ msgid "" " bad-path PATH is missing important programs, problems " "likely\n" " not-root Try to (de)install things even when not root\n" -" overwrite[*] Overwrite a file from one package with another\n" +" overwrite Overwrite a file from one package with another\n" " overwrite-diverted Overwrite a diverted file with an undiverted " "version\n" " depends-version [!] Turn dependency version problems into warnings\n" @@ -2574,206 +2574,217 @@ msgstr "" msgid "--forget-old-unavail takes no arguments" msgstr "" -#: dpkg-deb/build.c:50 +#: dpkg-deb/build.c:62 #, c-format msgid "dpkg-deb - error: %s (`%s') doesn't contain any digits\n" msgstr "" -#: dpkg-deb/build.c:72 +#. Decode our arguments +#: dpkg-deb/build.c:167 msgid "--build needs a directory argument" msgstr "" -#: dpkg-deb/build.c:81 +#: dpkg-deb/build.c:176 msgid "--build takes at most two arguments" msgstr "" -#: dpkg-deb/build.c:85 +#: dpkg-deb/build.c:180 #, c-format msgid "unable to check for existence of archive `%.250s'" msgstr "" -#: dpkg-deb/build.c:98 +#: dpkg-deb/build.c:195 msgid "target is directory - cannot skip control file check" msgstr "" -#: dpkg-deb/build.c:99 +#: dpkg-deb/build.c:196 #, c-format msgid "" "dpkg-deb: warning, not checking contents of control area.\n" "dpkg-deb: building an unknown package in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:116 +#: dpkg-deb/build.c:214 msgid "package name has characters that aren't lowercase alphanums or `-+.'" msgstr "" -#: dpkg-deb/build.c:118 +#: dpkg-deb/build.c:216 #, c-format msgid "warning, `%s' contains user-defined Priority value `%s'\n" msgstr "" -#: dpkg-deb/build.c:123 +#: dpkg-deb/build.c:221 #, c-format msgid "warning, `%s' contains user-defined field `%s'\n" msgstr "" -#: dpkg-deb/build.c:129 +#: dpkg-deb/build.c:227 #, c-format msgid "%d errors in control file" msgstr "" -#: dpkg-deb/build.c:140 +#: dpkg-deb/build.c:238 #, c-format msgid "dpkg-deb: building package `%s' in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:147 +#: dpkg-deb/build.c:246 #, c-format msgid "control directory has bad permissions %03lo (must be >=0755 and <=0775)" msgstr "" -#: dpkg-deb/build.c:158 +#: dpkg-deb/build.c:257 #, c-format msgid "maintainer script `%.50s' is not a plain file or symlink" msgstr "" -#: dpkg-deb/build.c:160 +#: dpkg-deb/build.c:259 #, c-format msgid "" "maintainer script `%.50s' has bad permissions %03lo (must be >=0555 and " "<=0775)" msgstr "" -#: dpkg-deb/build.c:164 +#: dpkg-deb/build.c:263 #, c-format msgid "maintainer script `%.50s' is not stattable" msgstr "" -#: dpkg-deb/build.c:173 +#: dpkg-deb/build.c:273 msgid "empty string from fgets reading conffiles" msgstr "" -#: dpkg-deb/build.c:175 +#: dpkg-deb/build.c:275 #, c-format msgid "" "warning, conffile name `%.50s...' is too long, or missing final newline\n" msgstr "" -#: dpkg-deb/build.c:187 +#: dpkg-deb/build.c:287 #, c-format msgid "conffile `%.250s' does not appear in package" msgstr "" -#: dpkg-deb/build.c:189 +#: dpkg-deb/build.c:289 #, c-format msgid "conffile `%.250s' is not stattable" msgstr "" -#: dpkg-deb/build.c:191 +#: dpkg-deb/build.c:291 #, c-format msgid "warning, conffile `%s' is not a plain file\n" msgstr "" -#: dpkg-deb/build.c:196 +#: dpkg-deb/build.c:296 msgid "error reading conffiles file" msgstr "" -#: dpkg-deb/build.c:199 +#: dpkg-deb/build.c:299 msgid "error opening conffiles file" msgstr "" -#: dpkg-deb/build.c:202 +#: dpkg-deb/build.c:302 #, c-format msgid "dpkg-deb: ignoring %d warnings about the control file(s)\n" msgstr "" -#: dpkg-deb/build.c:208 +#. Now that we have verified everything its time to actually +#. * build something. Lets start by making the ar-wrapper. +#. +#: dpkg-deb/build.c:311 #, c-format msgid "unable to create `%.255s'" msgstr "" -#: dpkg-deb/build.c:209 +#: dpkg-deb/build.c:312 #, c-format msgid "unable to unbuffer `%.255s'" msgstr "" -#: dpkg-deb/build.c:213 dpkg-deb/build.c:272 +#: dpkg-deb/build.c:317 dpkg-deb/build.c:390 dpkg-deb/build.c:410 #, c-format msgid "failed to chdir to `%.255s'" msgstr "" -#: dpkg-deb/build.c:214 +#: dpkg-deb/build.c:318 msgid "failed to chdir to .../DEBIAN" msgstr "" -#: dpkg-deb/build.c:215 +#: dpkg-deb/build.c:319 dpkg-deb/build.c:412 msgid "failed to exec tar -cf" msgstr "" -#: dpkg-deb/build.c:218 +#. Create a temporary file to store the control data in. Immediately unlink +#. * our temporary file so others can't mess with it. +#. +#: dpkg-deb/build.c:325 msgid "failed to make tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:219 +#: dpkg-deb/build.c:326 #, c-format msgid "failed to open tmpfile (control), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:222 +#: dpkg-deb/build.c:329 #, c-format msgid "failed to unlink tmpfile (control), %s" msgstr "" -#: dpkg-deb/build.c:229 +#: dpkg-deb/build.c:337 msgid "failed to exec gzip -9c" msgstr "" -#: dpkg-deb/build.c:234 +#: dpkg-deb/build.c:342 msgid "failed to fstat tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:254 +#: dpkg-deb/build.c:365 msgid "failed to rewind tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:255 +#: dpkg-deb/build.c:366 msgid "control" msgstr "" -#: dpkg-deb/build.c:259 +#: dpkg-deb/build.c:373 msgid "failed to make tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:260 +#: dpkg-deb/build.c:374 #, c-format msgid "failed to open tmpfile (data), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:263 +#: dpkg-deb/build.c:377 #, c-format msgid "failed to unlink tmpfile (data), %s" msgstr "" -#: dpkg-deb/build.c:274 -msgid "failed to exec tar --exclude" +#: dpkg-deb/build.c:392 +msgid "failed to exec find" msgstr "" -#: dpkg-deb/build.c:284 +#: dpkg-deb/build.c:422 msgid "no compression copy loop" msgstr "" -#: dpkg-deb/build.c:290 +#: dpkg-deb/build.c:428 #, c-format -msgid "failed to exec gzip %s from tar --exclude" +msgid "failed to exec gzip %s from tar -cf" +msgstr "" + +#: dpkg-deb/build.c:434 dpkg-deb/build.c:437 +msgid "failed to write filename to tar pipe (data)" msgstr "" -#: dpkg-deb/build.c:305 +#: dpkg-deb/build.c:455 msgid "failed to rewind tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:308 +#: dpkg-deb/build.c:458 msgid "failed to exec cat (data)" msgstr "" @@ -3604,216 +3615,216 @@ msgstr "" msgid "%s to go back" msgstr "" -#: dselect/bindings.cc:72 +#: dselect/bindings.cc:69 msgid "[not bound]" msgstr "" -#: dselect/bindings.cc:76 +#: dselect/bindings.cc:73 #, c-format msgid "[unk: %d]" msgstr "" #. Actions which apply to both types of list. -#: dselect/bindings.cc:130 +#: dselect/bindings.cc:127 msgid "Scroll onwards through help/information" msgstr "" -#: dselect/bindings.cc:131 +#: dselect/bindings.cc:128 msgid "Scroll backwards through help/information" msgstr "" -#: dselect/bindings.cc:132 +#: dselect/bindings.cc:129 msgid "Move up" msgstr "" -#: dselect/bindings.cc:133 +#: dselect/bindings.cc:130 msgid "Move down" msgstr "" -#: dselect/bindings.cc:134 +#: dselect/bindings.cc:131 msgid "Go to top of list" msgstr "" -#: dselect/bindings.cc:135 +#: dselect/bindings.cc:132 msgid "Go to end of list" msgstr "" -#: dselect/bindings.cc:136 +#: dselect/bindings.cc:133 msgid "Request help (cycle through help screens)" msgstr "" -#: dselect/bindings.cc:137 +#: dselect/bindings.cc:134 msgid "Cycle through information displays" msgstr "" -#: dselect/bindings.cc:138 +#: dselect/bindings.cc:135 msgid "Redraw display" msgstr "" -#: dselect/bindings.cc:139 +#: dselect/bindings.cc:136 msgid "Scroll onwards through list by 1 line" msgstr "" -#: dselect/bindings.cc:140 +#: dselect/bindings.cc:137 msgid "Scroll backwards through list by 1 line" msgstr "" -#: dselect/bindings.cc:141 +#: dselect/bindings.cc:138 msgid "Scroll onwards through help/information by 1 line" msgstr "" -#: dselect/bindings.cc:142 +#: dselect/bindings.cc:139 msgid "Scroll backwards through help/information by 1 line" msgstr "" -#: dselect/bindings.cc:143 +#: dselect/bindings.cc:140 msgid "Scroll onwards through list" msgstr "" -#: dselect/bindings.cc:144 +#: dselect/bindings.cc:141 msgid "Scroll backwards through list" msgstr "" #. Actions which apply only to lists of packages. -#: dselect/bindings.cc:147 +#: dselect/bindings.cc:144 msgid "Mark package(s) for installation" msgstr "" -#: dselect/bindings.cc:148 +#: dselect/bindings.cc:145 msgid "Mark package(s) for deinstallation" msgstr "" -#: dselect/bindings.cc:149 +#: dselect/bindings.cc:146 msgid "Mark package(s) for deinstall and purge" msgstr "" -#: dselect/bindings.cc:150 +#: dselect/bindings.cc:147 msgid "Make highlight more specific" msgstr "" -#: dselect/bindings.cc:151 +#: dselect/bindings.cc:148 msgid "Make highlight less specific" msgstr "" -#: dselect/bindings.cc:152 +#: dselect/bindings.cc:149 msgid "Search for a package whose name contains a string" msgstr "" -#: dselect/bindings.cc:153 +#: dselect/bindings.cc:150 msgid "Repeat last search." msgstr "" -#: dselect/bindings.cc:154 +#: dselect/bindings.cc:151 msgid "Swap sort order priority/section" msgstr "" -#: dselect/bindings.cc:155 +#: dselect/bindings.cc:152 msgid "Quit, confirming, and checking dependencies" msgstr "" -#: dselect/bindings.cc:156 +#: dselect/bindings.cc:153 msgid "Quit, confirming without check" msgstr "" -#: dselect/bindings.cc:157 +#: dselect/bindings.cc:154 msgid "Quit, rejecting conflict/dependency suggestions" msgstr "" -#: dselect/bindings.cc:158 +#: dselect/bindings.cc:155 msgid "Abort - quit without making changes" msgstr "" -#: dselect/bindings.cc:159 +#: dselect/bindings.cc:156 msgid "Revert to old state for all packages" msgstr "" -#: dselect/bindings.cc:160 +#: dselect/bindings.cc:157 msgid "Revert to suggested state for all packages" msgstr "" -#: dselect/bindings.cc:161 +#: dselect/bindings.cc:158 msgid "Revert to directly requested state for all packages" msgstr "" #. Actions which apply only to lists of methods. -#: dselect/bindings.cc:164 +#: dselect/bindings.cc:161 msgid "Select currently-highlighted access method" msgstr "" -#: dselect/bindings.cc:165 +#: dselect/bindings.cc:162 msgid "Quit without changing selected access method" msgstr "" -#: dselect/main.cc:55 +#: dselect/main.cc:53 msgid "Type dselect --help for help." msgstr "" -#: dselect/main.cc:71 +#: dselect/main.cc:69 msgid "access" msgstr "" -#: dselect/main.cc:71 +#: dselect/main.cc:69 msgid "Choose the access method to use." msgstr "" -#: dselect/main.cc:72 +#: dselect/main.cc:70 msgid "update" msgstr "" -#: dselect/main.cc:72 +#: dselect/main.cc:70 msgid "Update list of available packages, if possible." msgstr "" -#: dselect/main.cc:73 +#: dselect/main.cc:71 msgid "select" msgstr "" -#: dselect/main.cc:73 +#: dselect/main.cc:71 msgid "Request which packages you want on your system." msgstr "" -#: dselect/main.cc:74 dselect/pkgdisplay.cc:37 +#: dselect/main.cc:72 dselect/pkgdisplay.cc:37 msgid "install" msgstr "" -#: dselect/main.cc:74 +#: dselect/main.cc:72 msgid "Install and upgrade wanted packages." msgstr "" -#: dselect/main.cc:75 +#: dselect/main.cc:73 msgid "config" msgstr "" -#: dselect/main.cc:75 +#: dselect/main.cc:73 msgid "Configure any packages that are unconfigured." msgstr "" -#: dselect/main.cc:76 dselect/pkgdisplay.cc:39 +#: dselect/main.cc:74 dselect/pkgdisplay.cc:39 msgid "remove" msgstr "" -#: dselect/main.cc:76 +#: dselect/main.cc:74 msgid "Remove unwanted software." msgstr "" -#: dselect/main.cc:77 +#: dselect/main.cc:75 msgid "quit" msgstr "" -#: dselect/main.cc:77 +#: dselect/main.cc:75 msgid "Quit dselect." msgstr "" -#: dselect/main.cc:78 +#: dselect/main.cc:76 msgid "menu" msgstr "" -#: dselect/main.cc:83 +#: dselect/main.cc:81 #, c-format msgid "Debian GNU/Linux `%s' package handling frontend." msgstr "" -#: dselect/main.cc:86 +#: dselect/main.cc:84 #, c-format msgid "" "Version %s. Copyright (C) 1994-1996 Ian Jackson. This is\n" @@ -3822,7 +3833,7 @@ msgid "" "details.\n" msgstr "" -#: dselect/main.cc:98 +#: dselect/main.cc:96 msgid "" "Usage: dselect [options]\n" " dselect [options] action ...\n" @@ -3831,30 +3842,30 @@ msgid "" "Actions: access update select install config remove quit menu\n" msgstr "" -#: dselect/main.cc:118 +#: dselect/main.cc:116 #, c-format msgid "couldn't open debug file `%.255s'\n" msgstr "" -#: dselect/main.cc:149 +#: dselect/main.cc:147 msgid "Terminal does not appear to support cursor addressing.\n" msgstr "" -#: dselect/main.cc:151 +#: dselect/main.cc:149 msgid "Terminal does not appear to support highlighting.\n" msgstr "" -#: dselect/main.cc:152 +#: dselect/main.cc:150 msgid "" "Set your TERM variable correctly, use a better terminal,\n" "or make do with the per-package management tool " msgstr "" -#: dselect/main.cc:154 +#: dselect/main.cc:152 msgid "terminal lacks necessary features, giving up" msgstr "" -#: dselect/main.cc:233 +#: dselect/main.cc:231 msgid "" "\n" "\n" @@ -3863,18 +3874,18 @@ msgid "" "\n" msgstr "" -#: dselect/main.cc:247 +#: dselect/main.cc:245 msgid "" "\n" "\n" "Read-only access: only preview of selections is available!" msgstr "" -#: dselect/main.cc:261 +#: dselect/main.cc:259 msgid "failed to getch in main menu" msgstr "" -#: dselect/main.cc:328 +#: dselect/main.cc:326 #, c-format msgid "unknown action string `%.50s'" msgstr "" @@ -4006,126 +4017,126 @@ msgstr "" msgid "query/setup script" msgstr "" -#: dselect/methparse.cc:53 +#: dselect/methparse.cc:51 #, c-format msgid "syntax error in method options file `%.250s' -- %s" msgstr "" -#: dselect/methparse.cc:58 +#: dselect/methparse.cc:56 #, c-format msgid "error reading options file `%.250s'" msgstr "" -#: dselect/methparse.cc:86 +#: dselect/methparse.cc:84 #, c-format msgid "unable to read `%.250s' directory for reading methods" msgstr "" -#: dselect/methparse.cc:100 +#: dselect/methparse.cc:98 #, c-format msgid "method `%.250s' has name that is too long (%d > %d characters)" msgstr "" -#: dselect/methparse.cc:111 +#: dselect/methparse.cc:109 #, c-format msgid "unable to access method script `%.250s'" msgstr "" -#: dselect/methparse.cc:117 +#: dselect/methparse.cc:115 #, c-format msgid "unable to read method options file `%.250s'" msgstr "" -#: dselect/methparse.cc:140 +#: dselect/methparse.cc:138 msgid "non-digit where digit wanted" msgstr "" -#: dselect/methparse.cc:143 +#: dselect/methparse.cc:141 msgid "EOF in index string" msgstr "" -#: dselect/methparse.cc:146 +#: dselect/methparse.cc:144 msgid "index string too long" msgstr "" -#: dselect/methparse.cc:149 +#: dselect/methparse.cc:147 msgid "newline before option name start" msgstr "" -#: dselect/methparse.cc:151 +#: dselect/methparse.cc:149 msgid "EOF before option name start" msgstr "" -#: dselect/methparse.cc:155 +#: dselect/methparse.cc:153 msgid "nonalpha where option name start wanted" msgstr "" -#: dselect/methparse.cc:157 +#: dselect/methparse.cc:155 msgid "non-alphanum in option name" msgstr "" -#: dselect/methparse.cc:160 +#: dselect/methparse.cc:158 msgid "EOF in option name" msgstr "" -#: dselect/methparse.cc:165 +#: dselect/methparse.cc:163 msgid "newline before summary" msgstr "" -#: dselect/methparse.cc:167 +#: dselect/methparse.cc:165 msgid "EOF before summary" msgstr "" -#: dselect/methparse.cc:173 +#: dselect/methparse.cc:171 msgid "EOF in summary - missing newline" msgstr "" -#: dselect/methparse.cc:183 +#: dselect/methparse.cc:181 #, c-format msgid "unable to open option description file `%.250s'" msgstr "" -#: dselect/methparse.cc:187 +#: dselect/methparse.cc:185 #, c-format msgid "unable to stat option description file `%.250s'" msgstr "" -#: dselect/methparse.cc:191 +#: dselect/methparse.cc:189 #, c-format msgid "failed to read option description file `%.250s'" msgstr "" -#: dselect/methparse.cc:194 +#: dselect/methparse.cc:192 #, c-format msgid "error during read of option description file `%.250s'" msgstr "" -#: dselect/methparse.cc:216 +#: dselect/methparse.cc:214 #, c-format msgid "error during read of method options file `%.250s'" msgstr "" -#: dselect/methparse.cc:246 +#: dselect/methparse.cc:244 #, c-format msgid "unable to open current option file `%.250s'" msgstr "" -#: dselect/methparse.cc:284 +#: dselect/methparse.cc:282 #, c-format msgid "unable to open new option file `%.250s'" msgstr "" -#: dselect/methparse.cc:287 +#: dselect/methparse.cc:285 #, c-format msgid "unable to write new option to `%.250s'" msgstr "" -#: dselect/methparse.cc:290 +#: dselect/methparse.cc:288 #, c-format msgid "unable to close new option file `%.250s'" msgstr "" -#: dselect/methparse.cc:292 +#: dselect/methparse.cc:290 #, c-format msgid "unable to install new option as `%.250s'" msgstr "" diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index e65b0028..01ba40a1 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -160,6 +160,10 @@ for $_ (keys %fi) { } $f{'Version'}= $forceversion if length($forceversion); +$version= $f{'Version'}; +$origversion= $version; $origversion =~ s/-[^-]+$//; +$substvar{"dpkg:UpstreamVersion"}=$origversion; +$substvar{"dpkg:Version"}=$version; for $f (qw(Section Priority)) { $spvalue{$f}= $spdefault{$f} unless length($spvalue{$f}); -- 2.39.5