From nobody Fri Mar 04 10:44:33 2022 X-Original-To: pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AFD1B19F875C for ; Fri, 4 Mar 2022 10:44:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K94H531jVz4j1f for ; Fri, 4 Mar 2022 10:44:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4379D25E9 for ; Fri, 4 Mar 2022 10:44:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 224AiXW1010929 for ; Fri, 4 Mar 2022 10:44:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 224AiXKx010928 for pkg@FreeBSD.org; Fri, 4 Mar 2022 10:44:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 262337] ports-mgmt/pkg restore fails when created by periodic in /var/backups Date: Fri, 04 Mar 2022 10:44:33 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646390673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HaqcZ6aJTQnko9MYtuK6fm2foW2OmgIeUlKK8Ayo7Jk=; b=bRy9Q7p5KuZpVaCvbdBmhZ8gikQk08VxinJVEk8tUkXWq0zX93MSD4EXaFJt1qT1J2jU2m K5zxDogjtk3wncPY7Iqtuq7Y/QB1v89/jBm0LtBSk9QTeCpv+S5znpDDB+PRylv8hMwtb3 ht/dD+gAfkeDUwb6RQJFx068UMMTm+VlfG9nyL4NbDjLU09ri8bIMaUuTRA0gHzQS4sJGV 7+1Fx9ySeyMTDk1asm1jBiAWszskXlbJxL3zuBuqTMa2gQKsKWt3hKnrHB09y1SAO6hbY2 6OuXMZpD4e6x1iOGywvUgUdTfs1uw+Qgi/x2UhEWxZ3qSD/CnrFSDPqN4O0NVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646390673; a=rsa-sha256; cv=none; b=YF56wY2MM/bmmtaFrZx54Q6IkxzLu1WgZwFEdq73rKiKQL3T1ewdBGfN2sxxlRbl6L0cvJ X3oEQ6sFgqH+pelugKEFGx26nS9G/iUfUMqhloZsH/XpyHT6gcZyRQUgVKawiT/ai7Xbdo wNNbZBVYlDQ3xe4Yjh5S1F2dSfLl3qQ/ZOHBILDRYJrrpTN3xMol3jx10y3wjra5AXl2/y dI6IReBmsaTXrBc+gx+ugaA3TftMCX2nB3swPq1PvxVInh8PxOmYlg/bixxufgcqo2SEXF MH0tXNThe0RnAvnx4+6QqfDfpkLxPDyvdZCzDQ0ocWKkYuuKpmS6p9J0NjDA/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N Bugzilla Automation has asked freebsd-pkg (Nobody) for maintainer-feedback: Bug 262337: ports-mgmt/pkg restore fails when created by periodic in /var/backups https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262337 --- Description --- Running 12.3-Stable and pkg 1.17.5_1. When Restoring the pkg.sql from /var/backups (handled by /usr/local/etc/periodic/daily/411.pkg-backup) Restore fails. When backing up via pkg backup -d and restoring this there is no error. Tried this on 3 machines, same behaviour. =3D=3D=3D root@nbsdrosen (pts/8) /var/db/pkg 11(2) -> pkg -ddddd backup -r = pkg.sql=20 DBG(1)[5616]> pkg initialized DBG(4)[5616]> Pkgdb: running 'PRAGMA user_version;' DBG(4)[5616]> Pkgdb: executing 'PRAGMA foreign_keys =3D ON;' DBG(4)[5616]> Pkgdb: executing 'PRAGMA mmap_size=3D268435456;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO mtree(conte= nt) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR REPLACE INTO packages( origin, name, version, comment, desc, message, arch, maintainer, www, prefi= x, flatsize, automatic, licenselogic, mtree_id, time, manifestdigest, dep_form= ula, vital)VALUES( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, (SELE= CT id FROM mtree WHERE content =3D ?14), NOW(), ?15, ?16, ?17 )' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE deps SET origin=3D?1, vers= ion=3D?2 WHERE name=3D?3;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO deps (origin, name, version, package_id) VALUES (?1, ?2, ?3, ?4)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO files (path, sha256, package_id) VALUES (?1, ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR REPLACE INTO files (pat= h, sha256, package_id) VALUES (?1, ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO directories(path) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_directories(package_id, directory_id, try) VALUES (?1, (SELECT id FROM directories WHERE path =3D ?2), ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO categories(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_categories(package_id, category_id) VALUES (?1, (SELECT id FROM categor= ies WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO licenses(na= me) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_licenses(package_= id, license_id) VALUES (?1, (SELECT id FROM licenses WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO users(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_users(package_id, user_id) VALUES (?1, (SELECT id FROM users WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO groups(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_groups(package_id, group_id) VALUES (?1, (SELECT id FROM groups WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO script(scri= pt) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_script(script_id, package_id, type) VALUES ((SELECT script_id FROM script WHERE script =3D ?1= ), ?2, ?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO option (opt= ion) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_option(package_id, option_id, value) VALUES (?1, (SELECT option_id FROM option WHERE option =3D ?2),?3)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO shlibs(name) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_shlibs_required(package_id, shlib_id) VALUES (?1, (SELECT id FROM shlibs WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_shlibs_provided(package_id, shlib_id) VALUES (?1, (SELECT id FROM shlibs WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO annotation(annotation) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR ROLLBACK INTO pkg_annotation(package_id, tag_id, value_id) VALUES (?1, (SELECT annotation= _id FROM annotation WHERE annotation =3D ?2), (SELECT annotation_id FROM annota= tion WHERE annotation =3D ?3))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO pkg_annotation(package_id, tag_id, value_id) VALUES ( (SELECT id FROM packa= ges WHERE name =3D ?1 ), (SELECT annotation_id FROM annotation WHERE annotation= =3D ?2), (SELECT annotation_id FROM annotation WHERE annotation =3D ?3))' DBG(4)[5616]> Pkgdb: preparing statement 'DELETE FROM pkg_annotation WHERE package_id IN (SELECT id FROM packages WHERE name =3D ?1) AND tag_id IN (SE= LECT annotation_id FROM annotation WHERE annotation =3D ?2)' DBG(4)[5616]> Pkgdb: preparing statement 'DELETE FROM annotation WHERE annotation_id NOT IN (SELECT tag_id FROM pkg_annotation) AND annotation_id = NOT IN (SELECT value_id FROM pkg_annotation)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_conflicts(package= _id, conflict_id) VALUES (?1, (SELECT id FROM packages WHERE name =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_provides(package_= id, provide_id) VALUES (?1, (SELECT id FROM provides WHERE provide =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO provides(provide) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE packages SET manifestdiges= t=3D?1 WHERE id=3D?2;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO config_files(path, content, package_id) VALUES (?1, ?2, ?3);' DBG(4)[5616]> Pkgdb: preparing statement 'UPDATE config_files SET content= =3D?1 WHERE path=3D?2;' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_requires(package_= id, require_id) VALUES (?1, (SELECT id FROM requires WHERE require =3D ?2))' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO requires(require) VALUES(?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT OR IGNORE INTO lua_script(lua_script) VALUES (?1)' DBG(4)[5616]> Pkgdb: preparing statement 'INSERT INTO pkg_lua_script(lua_script_id, package_id, type) VALUES ((SELECT lua_script_= id FROM lua_script WHERE lua_script =3D ?1), ?2, ?3)' Restoring database: Restoring: 100% pkg: sqlite error while executing backup step in file backup.c:98: not an e= rror pkg: sqlite error -- (null) Files created by pkg backup -d (pkg_backup.sql) and created by the periodic (pkg.sql) differ: -rw-r--r-- 1 root wheel - 78270464 4 M=C3=A4rz 11:42 pkg_backup.sql -rw-r--r-- 1 root wheel - 51963917 4 M=C3=A4rz 03:04 pkg.sql