Hello community,
here is the log from the commit of package yast2-add-on-creator
checked in at Wed Aug 6 01:59:46 CEST 2008.
--------
--- yast2-add-on-creator/yast2-add-on-creator.changes 2008-06-18 11:58:48.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-add-on-creator/yast2-add-on-creator.changes 2008-08-05 13:26:33.618545000 +0200
@@ -1,0 +2,13 @@
+Tue Aug 5 12:46:55 CEST 2008 - jsuchome@suse.cz
+
+- recreate package metadata after signing RPMs (bnc#412591)
+- more logging during write phase
+- 2.17.3
+
+-------------------------------------------------------------------
+Mon Jul 14 09:52:18 CEST 2008 - jsuchome@suse.cz
+
+- read all content file values from saved configuration (bnc#406153)
+- 2.17.2
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-creator-2.17.1.tar.bz2
New:
----
yast2-add-on-creator-2.17.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on-creator.spec ++++++
--- /var/tmp/diff_new_pack.B18296/_old 2008-08-06 01:59:37.000000000 +0200
+++ /var/tmp/diff_new_pack.B18296/_new 2008-08-06 01:59:37.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package yast2-add-on-creator (Version 2.17.1)
+# spec file for package yast2-add-on-creator (Version 2.17.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -12,12 +19,12 @@
Name: yast2-add-on-creator
-Version: 2.17.1
+Version: 2.17.3
Release: 1
License: GPL v2 only; GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-add-on-creator-2.17.1.tar.bz2
+Source0: yast2-add-on-creator-2.17.3.tar.bz2
Prefix: /usr
PreReq: %fillup_prereq
Requires: yast2
@@ -32,10 +39,10 @@
Authors:
--------
- Jiř� Suchomel
+ Jiri Suchomel
%prep
-%setup -n yast2-add-on-creator-2.17.1
+%setup -n yast2-add-on-creator-2.17.3
%build
%{prefix}/bin/y2tool y2autoconf
@@ -74,8 +81,14 @@
/usr/lib/YaST2/servers_non_y2/ag_*
%doc %{prefix}/share/doc/packages/yast2-add-on-creator
/var/adm/fillup-templates/sysconfig.add-on-creator
-
%changelog
+* Tue Aug 05 2008 jsuchome@suse.cz
+- recreate package metadata after signing RPMs (bnc#412591)
+- more logging during write phase
+- 2.17.3
+* Mon Jul 14 2008 jsuchome@suse.cz
+- read all content file values from saved configuration (bnc#406153)
+- 2.17.2
* Wed Jun 18 2008 jsuchome@suse.cz
- 2.17.1
* Tue Jun 17 2008 lslezak@suse.cz
++++++ yast2-add-on-creator-2.17.1.tar.bz2 -> yast2-add-on-creator-2.17.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.17.1/agents/ag_pattern new/yast2-add-on-creator-2.17.3/agents/ag_pattern
--- old/yast2-add-on-creator-2.17.1/agents/ag_pattern 2008-06-17 12:20:02.000000000 +0200
+++ new/yast2-add-on-creator-2.17.3/agents/ag_pattern 2008-06-25 10:36:49.000000000 +0200
@@ -79,7 +79,7 @@
$err_no = 10;
return 0;
}
- my $o = open(PATTERN, $file =~ /\.gz$/ ? "| /usr/bin/gzip -9 -c $file" : "> $file");
+ my $o = open(PATTERN, $file =~ /\.gz$/ ? "| /usr/bin/gzip -9 -c '$file'" : "> $file");
if (!defined $o) {
y2error ("$file cannot be opened for writing!");
$err_no = 11;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.17.1/src/AddOnCreator.ycp new/yast2-add-on-creator-2.17.3/src/AddOnCreator.ycp
--- old/yast2-add-on-creator-2.17.1/src/AddOnCreator.ycp 2008-06-16 15:38:34.000000000 +0200
+++ new/yast2-add-on-creator-2.17.3/src/AddOnCreator.ycp 2008-08-05 12:15:00.000000000 +0200
@@ -24,7 +24,7 @@
* Summary: AddOnCreator settings, input and output functions
* Authors: Jiri Suchomel
*
- * $Id: AddOnCreator.ycp 48336 2008-06-16 13:39:14Z jsuchome $
+ * $Id: AddOnCreator.ycp 49022 2008-07-14 08:30:17Z jsuchome $
*
* Representation of the configuration of add-on-creator.
* Input and output routines.
@@ -43,7 +43,6 @@
import "Package";
import "PackageSystem";
import "PackagesDescr";
-import "Popup";
import "Progress";
import "Report";
import "String";
@@ -1618,11 +1617,14 @@
if (!FileUtils::Exists (descr_path)) return false;
+ y2milestone ("writing package description files...");
+
boolean ret = true;
if (descr == $[]) return ret;
foreach (string lang, map data, (map)descr, {
string file_path = descr_path + "/packages." + lang;
ret = ret && PackagesDescr::Write (file_path,(map)data);
+ y2debug ("file '%1' written, retval: %2", file_path, ret);
if (compress_package_descriptions && gzip_installed ())
{
y2debug ("compressing %1 file: %2", file_path, SCR::Execute (
@@ -1636,6 +1638,7 @@
descr_path));
foreach (string file, [ "packages", "packages.DU", "packages.FL"], {
string pth = tmpdir + "/" + file;
+ y2debug ("processing '%1'", pth);
boolean compress = false;
if (!FileUtils::Exists (pth) && FileUtils::Exists (pth + ".gz"))
pth = pth + ".gz";
@@ -1651,14 +1654,11 @@
});
}
- /* no need to read now, already done in UI or CLI
- if (extra_prov_file != "" && FileUtils::Exists (extra_prov_file))
- extra_prov = (string) SCR::Read (.target.string, extra_prov_file);
- */
string extra_prov = current_product["extra_prov"]:"";
if (extra_prov != "" && extra_prov != nil)
SCR::Write (.target.string, descr_path + "/EXTRA_PROV",extra_prov);
+ y2milestone ("... done");
return ret;
}
@@ -1788,7 +1788,7 @@
y2warning ("no %1 directory exists...", base_path);
return false;
}
-
+ y2milestone ("writing licenses...");
boolean ret = true;
string cmd = "";
foreach (string file, string cont, files, {
@@ -1879,7 +1879,9 @@
file = file + sformat ("+%1:\n%2\n-%1:\n", key, val);
}
});
- SCR::Write (.target.string, descr_path + "/" + filename, file);
+ y2milestone ("writing pattern %1/%2: %3", descr_path, filename,
+ SCR::Write (.target.string, descr_path + "/" + filename, file)
+ );
if (compress_patterns && gzip_installed ())
{
y2debug ("compressing pattern file: %1", SCR::Execute (
@@ -1926,12 +1928,14 @@
if (arch != "ZZZ_imported" && arch != "ZZZ_required" &&
FileUtils::Exists (out_dir))
{
+ y2milestone ("copying packages of '%1' arhitecture", arch);
// arch_directories will be needed later for CreateMD5SUMS and
// resign_packages
arch_directories = (list<string>)
union (arch_directories, [arch]);
if (size (package2filename) > 0 && arch != "src")
{
+ y2debug ("package names known");
foreach (string p, (list<string>) pa, {
SCR::Execute (.target.bash, sformat (
"/bin/cp %1 '%2/'", package2filename[arch,p]:"", out_dir));
@@ -1939,6 +1943,7 @@
}
else if (size (srcpackage2filename) > 0 && arch == "src")
{
+ y2debug ("source packages, names known");
foreach (string p, (list<string>) pa, {
SCR::Execute (.target.bash, sformat (
"/bin/cp %1 '%2/'", srcpackage2filename[arch,p]:"", out_dir));
@@ -1946,6 +1951,7 @@
}
else
{
+ y2debug ("package names not known, using wildcard");
foreach (string p, (list<string>) pa, {
SCR::Execute (.target.bash, sformat (
"/bin/cp %1/%2*.rpm '%3/'", in_path, p, out_dir));
@@ -2017,7 +2023,7 @@
boolean GenerateChangelog (string base_path)
{
if (!Package::Installed ("inst-source-utils") &&
- !FileUtils::Exists ("/usr/bin//usr/bin/mk_changelog"))
+ !FileUtils::Exists ("/usr/bin/mk_changelog"))
{
y2error("inst-source-utils not installed and mk_changelog not present");
return false;
@@ -2112,6 +2118,7 @@
foreach (string full_path, dirs_for_md5, {
if (dir_has_files (full_path))
{
+ y2milestone ("creating MDBSUM in %1", full_path);
// whole dir was copied -> also with original MD5SUMS
if (FileUtils::Exists (full_path + "/MD5SUMS"))
{
@@ -2129,6 +2136,7 @@
map out = (map) SCR::Execute (.target.bash_output, sformat ("ls -A1 '%1'", full_descr_path));
foreach (string file, splitstring (out["stdout"]:"", "\n"), {
if (file == "") return;
+ y2milestone ("creating sha1sum of %1", file);
out = (map) SCR::Execute (.target.bash_output,
sformat ("cd '%1' && sha1sum -- %2", full_descr_path, String::Quote (file)),
$["LANG" : "C"]);
@@ -2138,10 +2146,12 @@
});
// sha1sums of the rest of interesting files
- foreach (string file, [ "installation.xml", "license.tar.gz", "media.1/info.txt"],
+ foreach (string file, [ "installation.xml", "license.tar.gz",
+ "media.1/info.txt"],
{
if (FileUtils::Exists (base_path + "/" + file))
{
+ y2milestone ("creating sha1sum of %1", file);
out = (map) SCR::Execute (.target.bash_output,
sformat ("cd '%1' && sha1sum -- %2", base_path, String::Quote (file)), $["LANG" : "C"]);
string command = sformat ("echo 'HASH SHA1 %1' >> '%2/content'",
@@ -2212,7 +2222,9 @@
}
/**
- * Sign the add-on
+ * Sign current Add-On product
+ * @param base_path path to target product directory
+ * @param key GPG key to sign with
*/
global boolean SignAddOn (string base_path, string key) {
@@ -2252,6 +2264,7 @@
deletechars (out["stdout"]:"", "\n"), base_path);
SCR::Execute (.target.bash, command, $["LANG" : "C"]);
});
+ y2milestone ("signing content file...");
while (true)
{
// sign the content file
@@ -2278,6 +2291,7 @@
}
else break;
}
+ y2milestone ("... done");
SCR::Execute (.target.bash,
sformat("gpg --export -a %1 > '%2/content.key'",local_key, base_path));
@@ -2285,6 +2299,7 @@
// sign the packages
if (current_product["resign_packages"]:false)
{
+ y2milestone ("signing the packages...");
string expect = tmpdir + "/sign.ex";
SCR::Write (.target.string, expect,
sformat (expect_script, key, passphrase));
@@ -2298,20 +2313,42 @@
out = (map) SCR::Execute (.target.bash_output, cmd);
}
});
+ y2milestone ("... done");
SCR::Execute (.target.bash, sformat ("rm %1", expect));
+ // after signing packages checksums have changed:
+ // run create_package_descr again and take new 'packages' file
+ y2milestone ("updating packages descriptions...");
+ string cmd = sformat("/usr/bin/create_package_descr -d %1 -C -F -o %2",
+ full_data_path, tmpdir);
+ if (SCR::Execute (.target.bash, cmd, $["LANG":"C"]) == 0)
+ {
+ cmd = sformat ("/bin/cp %1/packages '%2'", tmpdir, full_descr_path);
+ SCR::Execute (.target.bash, cmd, $["LANG":"C"]);
+ if (compress_package_descriptions)
+ {
+ SCR::Execute (.target.bash,
+ sformat ("gzip %1/packages", full_descr_path));
+ }
+ }
+ else
+ {
+ y2warning ("'%1' failed", cmd);
+ }
+ y2milestone ("... done");
}
-
// sign products file
string products_path = full_media_paths[0]:"" + "/products";
if (FileUtils::Exists (products_path))
{
+ y2milestone ("signing products file...");
SCR::Execute (.target.bash, sformat ("rm -f '%1.asc'", products_path));
SCR::Execute (.target.bash,
sformat("gpg --batch --no-tty --passphrase-fd 0 --detach-sign -u %1 -a '%2' < %3",
local_key, products_path, pw_path));
SCR::Execute (.target.bash,
sformat("gpg --export -a %1 > '%2.key'", local_key,products_path));
+ y2milestone ("... done");
}
SCR::Execute (.target.remove, pw_path);
return true;
@@ -2325,11 +2362,13 @@
if (!FileUtils::Exists (base_path)) return false;
+ y2milestone ("creating directory.yast files...");
foreach (string dir, (list<string>) merge (
[base_path, full_descr_path], full_media_paths),
{
SCR::Execute (.target.bash_output, sformat ("cd '%1'; ls -A1 -p | grep -v 'directory.yast' > directory.yast", dir), $["LANG" : "C"]);
});
+ y2milestone ("... done");
return true;
}
@@ -2350,13 +2389,18 @@
name = name + ".iso";
current_product["iso_name"] = name; // ??
+ y2milestone ("creating iso image '%1/%2' from '%3' with mkisofs...",
+ iso_p, name, dir_path);
+
// possible options -allow-leading-dots
- string cmd = sformat("mkisofs -r -J -l -o '%1/%2' '%3'",iso_p, name, dir_path);
+ string cmd = sformat("mkisofs -r -J -l -o '%1/%2' '%3'",
+ iso_p, name, dir_path);
map out = (map) SCR::Execute (.target.bash_output, cmd);
if (out["exit"]:0 != 0)
{
y2warning ("%1 returned %2", cmd, out);
}
+ y2milestone ("... done");
return true;
}
@@ -2389,6 +2433,8 @@
*/
global void CommitCurrentProduct () {
+ y2milestone ("saving current product to the global list");
+
map modified_product = union (current_product, $[
"content_map" : content_map,
"available_packages" : available_packages,
@@ -2423,6 +2469,17 @@
entry["value"] = content_map[key]:"";
content = add (content, entry);
});
+ foreach (string key, string val, content_map, {
+ if (!haskey (content_descr, key) && issubstring (key, "."))
+ {
+ y2debug ("key %1 not in descr", key);
+ map entry =
+ content_specials[substring (key,0,findfirstof (key,"."))]:$[];
+ entry["key"] = key;
+ entry["value"] = val;
+ content = add (content, entry);
+ }
+ });
available_packages = product["available_packages"]:$[];
arch_directories = product["arch_directories"]:[];
package2filename = product["package2filename"]:$[];
@@ -2443,6 +2500,7 @@
});
return product;
});
+ y2milestone ("writing list of configured products");
return SCR::Write (.target.ycp, add_on_products_file, add_on_products);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.17.1/VERSION new/yast2-add-on-creator-2.17.3/VERSION
--- old/yast2-add-on-creator-2.17.1/VERSION 2008-06-18 11:54:40.000000000 +0200
+++ new/yast2-add-on-creator-2.17.3/VERSION 2008-08-05 12:47:46.000000000 +0200
@@ -1 +1 @@
-2.17.1
+2.17.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org