Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mirrorsorcerer for openSUSE:Factory checked in at 2022-03-06 18:15:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mirrorsorcerer (Old) and /work/SRC/openSUSE:Factory/.mirrorsorcerer.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mirrorsorcerer" Sun Mar 6 18:15:45 2022 rev:4 rq:959677 version:0.1.0~9 Changes: -------- --- /work/SRC/openSUSE:Factory/mirrorsorcerer/mirrorsorcerer.changes 2022-03-04 00:17:44.516286499 +0100 +++ /work/SRC/openSUSE:Factory/.mirrorsorcerer.new.1958/mirrorsorcerer.changes 2022-03-06 18:15:59.807827802 +0100 @@ -1,0 +2,7 @@ +Sun Mar 06 05:04:51 UTC 2022 - [email protected] + +- Update to version 0.1.0~9: + * Fix oneshot mode to work correctly + * Improve options for performance + +------------------------------------------------------------------- Old: ---- mirrorsorcerer-0.1.0~8.tar.xz New: ---- mirrorsorcerer-0.1.0~9.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mirrorsorcerer.spec ++++++ --- /var/tmp/diff_new_pack.s8Mof9/_old 2022-03-06 18:16:00.627827913 +0100 +++ /var/tmp/diff_new_pack.s8Mof9/_new 2022-03-06 18:16:00.631827914 +0100 @@ -17,7 +17,7 @@ Name: mirrorsorcerer -Version: 0.1.0~8 +Version: 0.1.0~9 Release: 0 Summary: Mirror Sorcerer tool to magically make OpenSUSE mirror sources more magic-er License: (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND (MIT OR Unlicense) AND (Apache-2.0 OR Zlib OR MIT) AND BSD-3-Clause AND MIT AND MPL-2.0 ++++++ mirrorsorcerer-0.1.0~8.tar.xz -> mirrorsorcerer-0.1.0~9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mirrorsorcerer-0.1.0~8/src/main.rs new/mirrorsorcerer-0.1.0~9/src/main.rs --- old/mirrorsorcerer-0.1.0~8/src/main.rs 2022-02-20 23:43:23.000000000 +0100 +++ new/mirrorsorcerer-0.1.0~9/src/main.rs 2022-03-06 06:03:21.000000000 +0100 @@ -90,6 +90,53 @@ None } +fn rewrite_zyppconf() { + info!("Updating zypp.conf to have safe options."); + + let backup = Path::new("/etc/zypp/zypp.conf.msbak"); + if !backup.exists() { + if let Err(e) = fs::copy("/etc/zypp/zypp.conf", backup) { + error!(?e, "Unable to backup zypp.conf original."); + return; + } else { + info!("Backed up /etc/zypp/zypp.conf -> /etc/zypp/zypp.conf.msbak"); + } + } + + let mut zyppconf = match ini::Ini::load_from_file("/etc/zypp/zypp.conf") { + Ok(r) => { + let mut dump: Vec<u8> = Vec::new(); + let _ = r.write_to(&mut dump); + let dump = unsafe { String::from_utf8_unchecked(dump) }; + debug!(%dump); + r + } + Err(e) => { + warn!(?e, "Failed to load /etc/zypp/zypp.conf"); + return; + } + }; + + match zyppconf.section_mut(Some("main")) { + Some(sect) => { + // Seems wayyy too aggressive, default is 10 + sect.insert("repo.refresh.delay", "15"); + // Prevent chunking which tanks performance. + sect.insert("download.max_concurrent_connections", "1"); + // This is a foot-nuclear-rpg-gun. + sect.insert("commit.downloadMode", "DownloadInAdvance"); + } + None => { + warn!("No main section in /etc/zypp/zypp.conf"); + return; + } + } + + if let Err(e) = zyppconf.write_to_file("/etc/zypp/zypp.conf") { + warn!(?e, "Unable to write /etc/zypp/zypp.conf configuration"); + } +} + fn rewrite_mirror(p: &Path, m: &Url, known_m: &[Url]) { if p.extension().and_then(|s| s.to_str()) != Some("repo") { debug!(?p, "Ignoring"); @@ -266,6 +313,10 @@ return; } + // Update zypper config to select non-shit options. There are + // some really unsafe and slow options that it chooses ... + rewrite_zyppconf(); + // Profile the mirror latencies, since latency is the single // largest issues in zypper metadata access. @@ -290,7 +341,7 @@ rewrite_mirror(p, &m, &known_m); }); - if !config.oneshot { + if config.oneshot { return; } ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/mirrorsorcerer/vendor.tar.xz /work/SRC/openSUSE:Factory/.mirrorsorcerer.new.1958/vendor.tar.xz differ: char 26, line 1
