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 C72FB19F8956 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 4K94H54Yz9z4j8F 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 79F46269B 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 224AiXAV010939 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 224AiXvt010938 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 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [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-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None 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: rosenke@dssgmbh.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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; bh=RgpwVqWQpvLYnm3vvMzIIVQVNit1dekZN/boEKgcesk=; b=g0+qk1cXNW7aIeVBzNGoi8U54135rjyx9ZUhmpyQ/otDf8dyZsplkPGj/KPAJ9xzjmmDXA kYCxyCpEXXADpNAmRVflG2mDpRsp+IEAKzUdMvZTfnNouaxyiIlCskyO7a7G+gThreFbop opStxVvkWGE+o8Ap6MWl3ucTupfYz5m1Kbvg5OBwlcpQffytsk4wu+uypw0H4pyy8gddhb 6CLNo82KNYVNo4NFI29mxhdFhI2zlYscZF1UGuSwir7Yg5XJhTYMnxGrUTapa/9vz5JYSj LJhFSiNcqC7QojlolumtTYxZHiHWLA/SqM+GCZMuk5rckG7ajT6qy5Jh9w7Snw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646390673; a=rsa-sha256; cv=none; b=ssP2R69px2pbldm5ysYJ+j2nIUorbgi+Vo1j8GHhOo/tsre5VCYMFPLUJTU+UjjqQpejQY RPpfiqoVk7OK0KMDxFrI/82+uivbdF+eVqBl1mTmOI0/5qj8o+m4sH0S5Ix3KOSlb2lLrR eHFnPSC6I8cto2TxbP41nqUzH904weVs6fTnWFDLia8OUIR6MOxlQ3nwVw1c4XfeMQnUYu vC3dHploaAgc/JRIYzRjTyz2eaPxIguCOV1DGVdIGDaMSpJ1rUwq/I+d1l1WlxTRyJXo0z /2Xf/2VXN9paozfUUDyZH7Bo7yCifcFyhC0EzshGi9Ble3DzzYDXEB7hj4tnkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262337 Bug ID: 262337 Summary: ports-mgmt/pkg restore fails when created by periodic in /var/backups Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: rosenke@dssgmbh.de Flags: maintainer-feedback?(pkg@FreeBSD.org) Assignee: pkg@FreeBSD.org 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 --=20 You are receiving this mail because: You are the assignee for the bug.=