Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package zram-generator for openSUSE:Factory checked in at 2022-01-10 23:53:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zram-generator (Old) and /work/SRC/openSUSE:Factory/.zram-generator.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zram-generator" Mon Jan 10 23:53:53 2022 rev:2 rq:945380 version:1.1.1~git5.8612dbb Changes: -------- --- /work/SRC/openSUSE:Factory/zram-generator/zram-generator.changes 2021-12-22 20:19:33.671889083 +0100 +++ /work/SRC/openSUSE:Factory/.zram-generator.new.1892/zram-generator.changes 2022-01-10 23:54:29.232850822 +0100 @@ -1,0 +2,21 @@ +Fri Jan 7 01:26:50 UTC 2022 - William Brown <william.br...@suse.com> + +- resolve bsc#1194113 (CVE-2018-25023) +- resolve bsc#1194119 (CVE-2021-45710) + +------------------------------------------------------------------- +Fri Jan 07 01:25:47 UTC 2022 - bbrun...@suse.com + +- Update to version 1.1.1~git5.8612dbb: + * Update install from source instruction + * Document workaround for making zram mounts user-writable (c.f. #146) + * Issue warning if /s/b/z0/backing_dev doesn't exist and wb-dev= set + * Skip test if unshare fails + * Accept NOMAN in Makefile, disabling build: and install: manpage processing + * Version 1.1.1 + * Bump minimum rust-ini to 0.15, first one with ordered keys + * Don't CLONE_NEWUSER when already root. Privatise all mounts first + * Add Aqs around README mails + * Update my author mail + +------------------------------------------------------------------- Old: ---- zram-generator-1.0.1~git25.5e0ec60.tar.xz New: ---- zram-generator-1.1.1~git5.8612dbb.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zram-generator.spec ++++++ --- /var/tmp/diff_new_pack.ITpkv7/_old 2022-01-10 23:54:29.668851205 +0100 +++ /var/tmp/diff_new_pack.ITpkv7/_new 2022-01-10 23:54:29.672851208 +0100 @@ -1,7 +1,7 @@ # -# spec file +# spec file for package zram-generator # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %global _systemd_util_dir /usr/lib/systemd Name: zram-generator -Version: 1.0.1~git25.5e0ec60 +Version: 1.1.1~git5.8612dbb Release: 0 Summary: Systemd unit generator for zram swap devices License: MIT @@ -77,4 +77,5 @@ %{_unitdir}/systemd-zram-setup@.service %{_mandir}/man8/zram-generator.8* %{_mandir}/man5/zram-generator.conf.5* + %changelog ++++++ vendor.tar.xz ++++++ ++++ 124472 lines of diff (skipped) ++++++ zram-generator-1.0.1~git25.5e0ec60.tar.xz -> zram-generator-1.1.1~git5.8612dbb.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/Cargo.toml new/zram-generator-1.1.1~git5.8612dbb/Cargo.toml --- old/zram-generator-1.0.1~git25.5e0ec60/Cargo.toml 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/Cargo.toml 2022-01-06 17:25:31.000000000 +0100 @@ -2,10 +2,10 @@ [package] name = "zram-generator" -version = "1.0.1" +version = "1.1.1" authors = ["Zbigniew J??drzejewski-Szmek <zbys...@in.waw.pl>", "Igor Raits <i.gnatenko.br...@gmail.com>", - "?????? <nabijaczlew...@gmail.com>"] + "?????? <nabijaczlew...@nabijaczleweli.xyz>"] license = "MIT" description = "Systemd unit generator for zram swap devices." homepage = "https://github.com/systemd/zram-generator" @@ -16,16 +16,18 @@ anyhow = "1.0.12" clap = { version = "2.33", default-features = false } liboverdrop = "0.0.2" -rust-ini = ">=0.13, <0.18" +rust-ini = ">=0.15, <0.18" log = { version = "0.4", features = ["std"] } fasteval = { version = "0.2", default-features = false } [dev-dependencies] tempfile = "3" fs_extra = "1.1" +nix = ">=0.22, <0.24" +ctor = "0.1" [profile.release] -lto = "thin" +lto = true opt-level = "z" codegen-units = 1 panic = "abort" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/Makefile new/zram-generator-1.1.1~git5.8612dbb/Makefile --- old/zram-generator-1.0.1~git25.5e0ec60/Makefile 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/Makefile 2022-01-06 17:25:31.000000000 +0100 @@ -22,7 +22,10 @@ .DEFAULT: build .PHONY: build systemd-service program man check clean install -build: program systemd-service man +build: program systemd-service +ifndef NOMAN +build: man +endif program: $(call require_env,SYSTEMD_UTIL_DIR) @@ -59,5 +62,7 @@ $(INSTALL) -Dpm755 target/$(BUILDTYPE)/zram-generator -t $(DESTDIR)$(SYSTEMD_SYSTEM_GENERATOR_DIR)/ $(INSTALL) -Dpm644 units/systemd-zram-setup@.service -t $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/ $(INSTALL) -Dpm644 zram-generator.conf.example -t $(DESTDIR)$(PREFIX)/share/doc/zram-generator/ +ifndef NOMAN $(INSTALL) -Dpm644 man/zram-generator.8 -t $(DESTDIR)$(PREFIX)/share/man/man8/ $(INSTALL) -Dpm644 man/zram-generator.conf.5 -t $(DESTDIR)$(PREFIX)/share/man/man5/ +endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/README.md new/zram-generator-1.1.1~git5.8612dbb/README.md --- old/zram-generator-1.0.1~git25.5e0ec60/README.md 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/README.md 2022-01-06 17:25:31.000000000 +0100 @@ -56,6 +56,17 @@ This will set up a /dev/zram1 with ext2 and generate a mount unit for /var/tmp. +In case you want this path to be user-writable, you can use following +"high-quality hack" until `systemd-makefs` provides a proper mechanism to +set ownership of a generated filesystem. For the above example, create an +override for `systemd-zram-setup@zram1.service`, for example with `systemctl edit`, +containing the following (note the sticky bit as required for [/var]/tmp): + +```ini +[Service] +ExecStartPost=/bin/sh -c 'd=$(mktemp -d); mount "$1" "$d"; chmod 1777 "$d"; umount "$d"; rmdir "$d"' _ /dev/%i +``` + ### Rust The second purpose of this program is to serve as an example of a systemd @@ -69,7 +80,7 @@ * Debian: packages provided by nabijaczleweli, see https://debian.nabijaczleweli.xyz/README. * Arch: `sudo pacman -S zram-generator` (or https://aur.archlinux.org/packages/zram-generator-git/ for the latest git commit) -To install directly from sources, execute `make build && sudo make install`: +To install directly from sources, execute `make build && sudo make install NOBUILD=true`: * `zram-generator` binary is installed in the systemd system generator directory (usually `/usr/lib/systemd/system-generators/`) * `zram-generator(8)` and `zram-generator.conf(5)` manpages are installed into `/usr/share/man/manN/`, this requires [`ronn`](https://github.com/apjanke/ronn-ng). * `units/systemd-zram-setup@.service` is copied into the systemd system unit directory (usually `/usr/lib/systemd/system/`) @@ -99,6 +110,6 @@ ### Authors -Written by Zbigniew J??drzejewski-Szmek <zbys...@in.waw.pl>, -Igor Raits <i.gnatenko.br...@gmail.com>, ?????? <nabijaczlew...@gmail.com>, and others. +Written by Zbigniew J??drzejewski-Szmek <<zbys...@in.waw.pl>>, +Igor Raits <<i.gnatenko.br...@gmail.com>>, ?????? <<nabijaczlew...@nabijaczleweli.xyz>>, and others. See https://github.com/systemd/zram-generator/graphs/contributors for the full list. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/man/zram-generator.conf.md new/zram-generator-1.1.1~git5.8612dbb/man/zram-generator.conf.md --- old/zram-generator-1.0.1~git25.5e0ec60/man/zram-generator.conf.md 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/man/zram-generator.conf.md 2022-01-06 17:25:31.000000000 +0100 @@ -71,6 +71,15 @@ If unset, none will be configured and the kernel's default will be used. +* `writeback-device`= + + Write incompressible pages, for which no gain was achieved, to the specified device under memory pressure. + This corresponds to the */sys/block/zramX/backing_dev* parameter. + + Takes a path to a block device, like */dev/disk/by-partuuid/2d54ffa0-01* or */dev/zvol/tarta-zoot/swap-writeback*. + + If unset, none is used, and incompressible pages are kept in RAM. + * `swap-priority`= Controls the relative swap priority, a value between -1 and 32767. Higher numbers indicate higher priority. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/src/config.rs new/zram-generator-1.1.1~git5.8612dbb/src/config.rs --- old/zram-generator-1.0.1~git25.5e0ec60/src/config.rs 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/src/config.rs 2022-01-06 17:25:31.000000000 +0100 @@ -22,6 +22,7 @@ /// Default: `DEFAULT_ZRAM_SIZE` pub zram_size: Option<(String, fasteval::ExpressionI, fasteval::Slab)>, pub compression_algorithm: Option<String>, + pub writeback_dev: Option<PathBuf>, pub disksize: u64, pub swap_priority: i32, @@ -45,6 +46,7 @@ host_memory_limit_mb: None, zram_size: None, compression_algorithm: None, + writeback_dev: None, disksize: 0, swap_priority: 100, mount_point: None, @@ -123,7 +125,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, - "{}: host-memory-limit={} zram-size={} compression-algorithm={} options={}", + "{}: host-memory-limit={} zram-size={} compression-algorithm={} writeback-device={} options={}", self.name, OptMB(self.host_memory_limit_mb), self.zram_size @@ -131,6 +133,7 @@ .map(|zs| &zs.0[..]) .unwrap_or(DEFAULT_ZRAM_SIZE), self.compression_algorithm.as_deref().unwrap_or("<default>"), + self.writeback_dev.as_deref().unwrap_or_else(|| Path::new("<none>")).display(), self.options )?; if self.zram_fraction.is_some() || self.max_zram_size_mb.is_some() { @@ -301,15 +304,15 @@ } } -fn verify_mount_point(val: &str) -> Result<PathBuf> { +fn verify_mount_point(key: &str, val: &str) -> Result<PathBuf> { let path = Path::new(val); if path.is_relative() { - return Err(anyhow!("mount-point {} is not absolute", val)); + return Err(anyhow!("{} {} is not absolute", key, val)); } if path.components().any(|c| c == Component::ParentDir) { - return Err(anyhow!("mount-point {:#?} is not normalized", path)); + return Err(anyhow!("{} {:#?} is not normalized", key, path)); } Ok(path.components().collect()) // normalise away /./ components @@ -337,12 +340,16 @@ dev.compression_algorithm = Some(value.to_string()); } + "writeback-device" => { + dev.writeback_dev = Some(verify_mount_point(key, value)?); + } + "swap-priority" => { dev.swap_priority = parse_swap_priority(value)?; } "mount-point" => { - dev.mount_point = Some(verify_mount_point(value)?); + dev.mount_point = Some(verify_mount_point(key, value)?); } "fs-type" => { @@ -499,7 +506,7 @@ #[test] fn test_verify_mount_point() { for e in ["foo/bar", "/foo/../bar", "/foo/.."] { - assert!(verify_mount_point(e).is_err(), "{}", e); + assert!(verify_mount_point("test", e).is_err(), "{}", e); } for (p, o) in [ @@ -510,7 +517,7 @@ ("/foo/./bar/", "/foo/bar"), ] { assert_eq!( - verify_mount_point(p).unwrap(), + verify_mount_point("test", p).unwrap(), Path::new(o), "{} vs {}", p, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/src/generator.rs new/zram-generator-1.1.1~git5.8612dbb/src/generator.rs --- old/zram-generator-1.0.1~git25.5e0ec60/src/generator.rs 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/src/generator.rs 2022-01-06 17:25:31.000000000 +0100 @@ -170,6 +170,36 @@ } } +fn handle_zram_bindings(output_directory: &Path, device: &Device, specific: &str) -> Result<()> { + let wb_unit = device + .writeback_dev + .as_ref() + .map(|wd| unit_name_from_path(wd, ".device")) + .unwrap_or_default(); + + /* systemd-zram-setup@.service. + * We use the packaged unit, and only need to provide a small drop-in. */ + write_contents( + output_directory, + &format!("systemd-zram-setup@{}.service.d/bindings.conf", device.name), + &format!( + "\ +[Unit] +BindsTo={}{}{}{}{} +", + specific, + &" "[device.writeback_dev.is_none() as usize..], + wb_unit, + device + .writeback_dev + .as_ref() + .map(|_| "\nAfter=") + .unwrap_or_default(), + wb_unit, + ), + ) +} + fn handle_zram_swap(output_directory: &Path, device: &Device) -> Result<()> { let swap_name = format!("dev-{}.swap", device.name); @@ -180,19 +210,7 @@ device.disksize / 1024 / 1024 ); - /* systemd-zram-setup@.service. - * We use the packaged unit, and only need to provide a small drop-in. */ - write_contents( - output_directory, - &format!( - "systemd-zram-setup@{}.service.d/bindsto-swap.conf", - device.name - ), - "\ -[Unit] -BindsTo=dev-%i.swap -", - )?; + handle_zram_bindings(output_directory, device, "dev-%i.swap")?; /* dev-zramX.swap */ write_contents( @@ -228,14 +246,14 @@ /// Path escaping as described in systemd.unit(5) /// /// `/./` components stripped away when parsing `mount-point =` -fn mount_unit_name(path: &Path) -> String { +fn unit_name_from_path(path: &Path, suffix: &str) -> String { assert!(path.is_absolute()); let trimmed = path.to_str().unwrap().trim_matches('/'); if trimmed.is_empty() { - "-.mount".to_string() + format!("-{}", suffix) } else { - let mut obuf = Vec::with_capacity(path.as_os_str().len() + ".mount".len()); + let mut obuf = Vec::with_capacity(path.as_os_str().len() + suffix.len()); let mut just_slash = false; for (i, &b) in trimmed.as_bytes().iter().enumerate() { if b == b'/' && just_slash { @@ -245,11 +263,11 @@ match b { b'/' => obuf.push(b'-'), b'.' if i == 0 => write!(obuf, "\\x{:02x}", b'.').unwrap(), - b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' | b'.' => obuf.push(b), + b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b':' | b'_' | b'.' => obuf.push(b), _ => write!(obuf, "\\x{:02x}", b).unwrap(), } } - obuf.extend_from_slice(b".mount"); + obuf.extend_from_slice(suffix.as_bytes()); String::from_utf8(obuf).unwrap() } } @@ -260,7 +278,7 @@ return Ok(()); } - let mount_name = &mount_unit_name(device.mount_point.as_ref().unwrap()); + let mount_name = &unit_name_from_path(device.mount_point.as_ref().unwrap(), ".mount"); debug!( "Creating unit file {} (/dev/{} with {}MB)", @@ -269,22 +287,7 @@ device.disksize / 1024 / 1024 ); - /* systemd-zram-setup@.service. - * We use the packaged unit, and only need to provide a small drop-in. */ - write_contents( - output_directory, - &format!( - "systemd-zram-setup@{}.service.d/bindsto-mount.conf", - device.name - ), - &format!( - "\ -[Unit] -BindsTo={} -", - mount_name - ), - )?; + handle_zram_bindings(output_directory, device, mount_name)?; write_contents( output_directory, @@ -369,22 +372,25 @@ } #[test] - fn test_mount_unit_name() { - assert_eq!(mount_unit_name(&Path::new("/waldo")), "waldo.mount"); + fn test_unit_name_from_path() { + assert_eq!( + unit_name_from_path(&Path::new("/waldo"), ".mount"), + "waldo.mount" + ); assert_eq!( - mount_unit_name(&Path::new("/waldo/quuix")), + unit_name_from_path(&Path::new("/waldo/quuix"), ".mount"), "waldo-quuix.mount" ); assert_eq!( - mount_unit_name(&Path::new("/waldo/quuix/")), + unit_name_from_path(&Path::new("/waldo/quuix/"), ".mount"), "waldo-quuix.mount" ); assert_eq!( - mount_unit_name(&Path::new("/waldo/quuix//")), + unit_name_from_path(&Path::new("/waldo/quuix//"), ".mount"), "waldo-quuix.mount" ); - assert_eq!(mount_unit_name(&Path::new("/")), "-.mount"); - assert_eq!(mount_unit_name(&Path::new("//")), "-.mount"); - assert_eq!(mount_unit_name(&Path::new("///")), "-.mount"); + assert_eq!(unit_name_from_path(&Path::new("/"), ".mount"), "-.mount"); + assert_eq!(unit_name_from_path(&Path::new("//"), ".mount"), "-.mount"); + assert_eq!(unit_name_from_path(&Path::new("///"), ".mount"), "-.mount"); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/src/setup.rs new/zram-generator-1.1.1~git5.8612dbb/src/setup.rs --- old/zram-generator-1.0.1~git25.5e0ec60/src/setup.rs 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/src/setup.rs 2022-01-06 17:25:31.000000000 +0100 @@ -5,6 +5,7 @@ use log::warn; use std::fs; use std::io::ErrorKind; +use std::os::unix::ffi::OsStrExt; use std::os::unix::process::ExitStatusExt; use std::path::Path; use std::process::Command; @@ -42,6 +43,20 @@ } } + if let Some(ref wb_dev) = device.writeback_dev { + let writeback_path = device_sysfs_path.join("backing_dev"); + if writeback_path.exists() { + fs::write(&writeback_path, wb_dev.as_os_str().as_bytes()).with_context(|| { + format!( + "Failed to configure write-back device into {}", + writeback_path.display() + ) + })?; + } else { + warn!("Warning: writeback-device={} set for {}, but system doesn't support write-back. Ignoring.", writeback_path.display(), device_name) + } + } + let disksize_path = device_sysfs_path.join("disksize"); fs::write(&disksize_path, format!("{}", device.disksize)).with_context(|| { format!( @@ -51,7 +66,6 @@ })?; let fs_type = device.effective_fs_type(); - match Command::new(SYSTEMD_MAKEFS_COMMAND).arg(fs_type).arg(Path::new("/dev").join(device_name)).status() { Ok(status) => match status.code() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/01-basic/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/02-zstd/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/04-dropins/run.expected/units/systemd-zram-setup@zram2.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,3 @@ +# Automatically generated by zram-generator +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/05-kernel-disabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -# Automatically generated by zram-generator -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/06-kernel-enabled/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/-.mount new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/-.mount --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/-.mount 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/-.mount 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/foo-bar-baz.mount new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/foo-bar-baz.mount --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/foo-bar-baz.mount 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/foo-bar-baz.mount 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=var-compressed.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram11.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=var-compressed.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=var-folded.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram12.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=var-folded.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=foo-bar-baz.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram13.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=foo-bar-baz.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=-.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/systemd-zram-setup@zram15.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=-.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/var-compressed.mount new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/var-compressed.mount --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/var-compressed.mount 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/var-compressed.mount 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/var-folded.mount new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/var-folded.mount --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07-mount-point/run.expected/units/var-folded.mount 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07-mount-point/run.expected/units/var-folded.mount 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" "new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" --- "old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" 2021-11-09 19:45:47.000000000 +0100 +++ "new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram14 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/local-fs.target.wants/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" "new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/local-fs.target.wants/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" --- "old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/local-fs.target.wants/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" 2021-11-09 19:45:47.000000000 +0100 +++ "new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/local-fs.target.wants/\\x2e\\xc5\\xbcupan\\x2dci3p\\xc5\\x82y.mount" 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram14 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=\x2e\xc5\xbcupan\x2dci3p\xc5\x82y.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/07a-mount-point-excl/run.expected/units/systemd-zram-setup@zram14.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=\x2e\xc5\xbcupan\x2dci3p\xc5\x82y.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/09-zram-size/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/local-fs.target.wants/run-compressed\\x2dmount\\x2dpoint.mount" "new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/local-fs.target.wants/run-compressed\\x2dmount\\x2dpoint.mount" --- "old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/local-fs.target.wants/run-compressed\\x2dmount\\x2dpoint.mount" 2021-11-09 19:45:47.000000000 +0100 +++ "new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/local-fs.target.wants/run-compressed\\x2dmount\\x2dpoint.mount" 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/run-compressed\\x2dmount\\x2dpoint.mount" "new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/run-compressed\\x2dmount\\x2dpoint.mount" --- "old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/run-compressed\\x2dmount\\x2dpoint.mount" 2021-11-09 19:45:47.000000000 +0100 +++ "new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/run-compressed\\x2dmount\\x2dpoint.mount" 2022-01-06 17:25:31.000000000 +0100 @@ -1,4 +1,4 @@ -# Automatically generated by "/home/zbyszek/src/zram-generator/target/debug/zram-generator" +# Automatically generated by zram-generator [Unit] Description=Compressed Storage on /dev/zram1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,5 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap dev-zvol-tarta\x2dzoot-swap\x2dwriteback.device +After=dev-zvol-tarta\x2dzoot-swap\x2dwriteback.device diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=run-compressed\x2dmount\x2dpoint.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-mount.conf new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-mount.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-mount.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/10-example/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-mount.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by "zram-generator" - -[Unit] -BindsTo=run-compressed\x2dmount\x2dpoint.mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram0.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindings.conf 2022-01-06 17:25:31.000000000 +0100 @@ -0,0 +1,4 @@ +# Automatically generated by zram-generator + +[Unit] +BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-swap.conf new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-swap.conf --- old/zram-generator-1.0.1~git25.5e0ec60/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-swap.conf 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/11-obsolete/run.expected/units/systemd-zram-setup@zram1.service.d/bindsto-swap.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Automatically generated by zram-generator - -[Unit] -BindsTo=dev-%i.swap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/tests/test_cases.rs new/zram-generator-1.1.1~git5.8612dbb/tests/test_cases.rs --- old/zram-generator-1.0.1~git25.5e0ec60/tests/test_cases.rs 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/tests/test_cases.rs 2022-01-06 17:25:31.000000000 +0100 @@ -7,9 +7,44 @@ use std::fs; use std::io::{self, Write}; use std::path::Path; -use std::process::Command; +use std::process::{exit, Command}; use tempfile::TempDir; +#[ctor::ctor] +fn unshorn() { + use nix::{errno, mount, sched, unistd}; + use std::os::unix::fs::symlink; + + let (uid, gid) = (unistd::geteuid(), unistd::getegid()); + if !uid.is_root() { + match sched::unshare(sched::CloneFlags::CLONE_NEWUSER) { + Err(errno::Errno::EPERM) => { + eprintln!("unshare(NEWUSER) forbidden and not running as root: skipping tests"); + exit(0); + } + r => r.expect("unshare(NEWUSER)"), + } + fs::write("/proc/self/setgroups", b"deny").unwrap(); + fs::write("/proc/self/uid_map", format!("0 {} 1", uid)).unwrap(); + fs::write("/proc/self/gid_map", format!("0 {} 1", gid)).unwrap(); + } + + sched::unshare(sched::CloneFlags::CLONE_NEWNS).expect("unshare(NEWNS)"); + mount::mount::<_, _, str, str>( + Some("none"), + "/", + None, + mount::MsFlags::MS_REC | mount::MsFlags::MS_PRIVATE, + None, + ) + .unwrap(); + + mount::mount::<str, _, _, str>(None, "/proc", Some("tmpfs"), mount::MsFlags::empty(), None) + .unwrap(); + fs::create_dir("/proc/self").unwrap(); + symlink("zram-generator", "/proc/self/exe").unwrap(); +} + fn prepare_directory(srcroot: &Path) -> Result<TempDir> { let rootdir = TempDir::new()?; let root = rootdir.path(); @@ -53,9 +88,6 @@ .arg("-u") .arg("--recursive") .arg("--exclude=.empty") - .arg("--ignore-matching-lines=^# Automatically generated by .*") - .arg("--ignore-matching-lines=^ExecStart=/.* --setup-device '%i'") - .arg("--ignore-matching-lines=^ExecStop=/.* --reset-device '%i'") .arg(srcroot.join("run.expected")) .arg(root.join("run")) .output()?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zram-generator-1.0.1~git25.5e0ec60/zram-generator.conf.example new/zram-generator-1.1.1~git5.8612dbb/zram-generator.conf.example --- old/zram-generator-1.0.1~git25.5e0ec60/zram-generator.conf.example 2021-11-09 19:45:47.000000000 +0100 +++ new/zram-generator-1.1.1~git5.8612dbb/zram-generator.conf.example 2022-01-06 17:25:31.000000000 +0100 @@ -28,6 +28,10 @@ # Setting this to the empty string clears the option. options = +# Write incompressible pages to this device, +# as there's no gain from keeping them in RAM +writeback-device = /dev/zvol/tarta-zoot/swap-writeback + # The following options are deprecated, and override zram-size. # These values would be equivalent to the zram-size setting above. #zram-fraction = 0.10