Files
blog-tech/public/posts/230508-remake-deb/index.html
T
2026-07-17 10:20:54 +08:00

683 lines
58 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en" dir="ltr"><head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="robots" content="index, follow" />
<link rel="icon shortcut" href="/resources/icon_32x32.png" sizes="32x32" />
<link rel="icon" href="/resources/icon_180x180.png" type="image/png" sizes="180x180" />
<link rel="apple-touch-icon" href="/resources/icon_180x180.png" sizes="180x180" />
<title>讨论在Debian系操作系统中重新提取已安装的软件并重新打包 – 香风家的火柴盒</title>
<meta name="description" content="Debian系操作系统采用dpkg作为包管理器,在安装软件后会存储deb包信息,是否可以提取这些信息并且重新打deb包转移到其他平台使用?" /><link rel="canonical" href="https://www.small09.top/posts/230508-remake-deb/" itemprop="url" />
<meta property="og:title" content="讨论在Debian系操作系统中重新提取已安装的软件并重新打包">
<meta
property="og:description"
content="
Debian系操作系统采用dpkg作为包管理器,在安装软件后会存储deb包信息,是否可以提取这些信息并且重新打deb包转移到其他平台使用?
">
<meta
property="og:type"
content="
article
">
<meta property="og:url" content="https://www.small09.top/posts/230508-remake-deb/"><meta property="article:section" content="posts">
<meta
property="article:published_time"
content="2023-05-08T14:43:41+08:00">
<meta
property="article:modified_time"
content="2023-05-08T14:43:41+08:00">
<meta itemprop="name" content="讨论在Debian系操作系统中重新提取已安装的软件并重新打包">
<meta itemprop="description" content="Debian系操作系统采用dpkg作为包管理器,在安装软件后会存储deb包信息,是否可以提取这些信息并且重新打deb包转移到其他平台使用?">
<meta itemprop="datePublished" content="2023-05-08T14:43:41+08:00">
<meta itemprop="dateModified" content="2023-05-08T14:43:41+08:00">
<meta itemprop="wordCount" content="30">
<meta itemprop="keywords" content="Linux,Deepin">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="讨论在Debian系操作系统中重新提取已安装的软件并重新打包">
<meta name="twitter:description" content="Debian系操作系统采用dpkg作为包管理器,在安装软件后会存储deb包信息,是否可以提取这些信息并且重新打deb包转移到其他平台使用?">
<link rel="preload" href="/css/compiled/main.min.dd0a2e06153504ce1622d60dbc1c29c348f59a33b1a7ebefabee95a192584553.css" as="style" integrity="sha256-3QouBhU1BM4WItYNvBwpw0j1mjOxp&#43;vvq&#43;6VoZJYRVM=" />
<link href="/css/compiled/main.min.dd0a2e06153504ce1622d60dbc1c29c348f59a33b1a7ebefabee95a192584553.css" rel="stylesheet" integrity="sha256-3QouBhU1BM4WItYNvBwpw0j1mjOxp&#43;vvq&#43;6VoZJYRVM=" />
<script src="/js/main-head.min.94da6f95b126542222dab3a6e07ffefe1aaf63ec3ca555e827b58b80e7d3f0b7.js" integrity="sha256-lNpvlbEmVCIi2rOm4H/&#43;/hqvY&#43;w8pVXoJ7WLgOfT8Lc="></script>
<link rel="stylesheet" href="/css/custom.css" />
</head>
<body>
<a href="#content" class="hx:sr-only hx:focus-visible:not-sr-only hx:focus-visible:fixed hx:focus-visible:z-50 hx:focus-visible:top-2 hx:focus-visible:left-2 hx:focus-visible:bg-primary-500 hx:focus-visible:text-white hx:focus-visible:px-4 hx:focus-visible:py-2 hx:focus-visible:rounded-md hx:focus-visible:text-sm hx:focus-visible:font-medium">跳至内容</a><div id="hextra-nav-wrapper" class="hextra-nav-container hx:sticky hx:top-0 hx:z-20 hx:w-full hx:bg-transparent hx:print:hidden" style="transition:transform 0.3s ease">
<div
class="hextra-nav-container-blur hx:pointer-events-none hx:absolute hx:z-[-1] hx:h-full hx:w-full hx:bg-white hx:dark:bg-dark hx:shadow-[0_2px_4px_rgba(0,0,0,.02),0_1px_0_rgba(0,0,0,.06)] hx:contrast-more:shadow-[0_0_0_1px_#000] hx:dark:shadow-[0_-1px_0_rgba(255,255,255,.1)_inset] hx:contrast-more:dark:shadow-[0_0_0_1px_#fff]"
></div>
<nav class="hextra-max-navbar-width hx:mx-auto hx:flex hx:items-center hx:justify-end hx:gap-1 hx:md:gap-2 hx:h-[var(--hextra-navbar-height)] hx:px-6">
<a class="hx:flex hx:items-center hx:hover:opacity-75 hx:ltr:mr-auto hx:rtl:ml-auto" href="/">
<img class="hx:mr-2 hx:block hx:dark:hidden" src="/resources/icon_180x180.png" alt="Logo" height="40" width="40" />
<img class="hx:mr-2 hx:hidden hx:dark:block" src="/resources/icon_180x180.png" alt="Dark Logo" height="40" width="40" />
<span class="hx:mr-2 hx:font-extrabold hx:inline hx:select-none">香风家的火柴盒</span>
</a>
<div style="flex-grow:1"></div>
<div class="hx:flex hx:items-center hx:text-sm hx:text-gray-500 hx:dark:text-gray-400" style="gap:1.25rem;padding-right:0.5rem;padding-top:0.5rem;padding-bottom:0.5rem"><a
href="/posts"
class="hx:whitespace-nowrap hx:hover:text-gray-900 hx:dark:hover:text-gray-100 hx:transition-colors"
>Blog</a><a
href="/daily"
class="hx:whitespace-nowrap hx:hover:text-gray-900 hx:dark:hover:text-gray-100 hx:transition-colors"
>Daily</a><a
href="/photograph"
class="hx:whitespace-nowrap hx:hover:text-gray-900 hx:dark:hover:text-gray-100 hx:transition-colors"
>Photograph</a></div><button type="button" aria-label="菜单" aria-expanded="false" class="hextra-hamburger-menu hx:cursor-pointer hx:-mr-1 hx:rounded-sm hx:p-1 hx:active:bg-gray-400/20 hx:md:hidden hx:hextra-focus-visible-inset"><svg height=24 fill="none" viewBox="0 0 24 24" stroke="currentColor"><g><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8H20"></path></g><g><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16H20"></path></g></svg></button>
</nav>
</div>
<script>
(function(){
var nav = document.getElementById('hextra-nav-wrapper');
if(!nav) return;
var lastScroll = 0;
var threshold = 10;
window.addEventListener('scroll', function(){
var st = window.pageYOffset || document.documentElement.scrollTop;
if(st <= 0){ nav.style.transform = 'translateY(0)'; return; }
if(Math.abs(st - lastScroll) < threshold) return;
if(st > lastScroll && st > 300){
nav.style.transform = 'translateY(-100%)';
} else {
nav.style.transform = 'translateY(0)';
}
lastScroll = st;
}, {passive:true});
})();
</script>
<div class="hx:mx-auto hx:flex hextra-max-page-width">
<aside class="hextra-sidebar-container hx:flex hx:flex-col hx:print:hidden hx:md:top-16 hx:md:shrink-0 hx:md:w-64 hx:md:self-start hx:max-md:[transform:translate3d(0,-100%,0)] hx:md:hidden hx:xl:block">
<div class="hx:px-4 hx:pt-4 hx:md:hidden">
<div class="hextra-search-wrapper hx:relative hx:md:w-64">
<div class="hx:relative hx:flex hx:items-center hx:text-gray-900 hx:contrast-more:text-gray-800 hx:dark:text-gray-300 hx:contrast-more:dark:text-gray-300">
<input
placeholder="搜索文档..."
aria-label="搜索文档..."
class="hextra-search-input hx:hextra-focus-visible hx:block hx:w-full hx:appearance-none hx:rounded-lg hx:px-3 hx:py-2 hx:transition-colors hx:text-base hx:leading-tight hx:md:text-sm hx:bg-black/[.05] hx:dark:bg-gray-50/10 hx:focus-visible:bg-white hx:dark:focus-visible:bg-dark hx:placeholder:text-gray-500 hx:dark:placeholder:text-gray-400 hx:contrast-more:border hx:contrast-more:border-current"
type="search"
autocomplete="off"
value=""
spellcheck="false"
/>
<kbd
class="hx:absolute hx:my-1.5 hx:select-none hx:ltr:right-1.5 hx:rtl:left-1.5 hx:h-5 hx:rounded-sm hx:bg-white hx:px-1.5 hx:font-mono hx:text-[10px] hx:font-medium hx:text-gray-500 hx:border hx:border-gray-200 hx:dark:border-gray-100/20 hx:dark:bg-dark/50 hx:contrast-more:border-current hx:contrast-more:text-current hx:contrast-more:dark:border-current hx:items-center hx:gap-1 hx:transition-opacity hx:pointer-events-none hx:hidden hx:sm:flex"
>
CTRL K
</kbd>
</div>
<div>
<ul
class="hextra-search-results hextra-scrollbar hx:hidden hx:border hx:border-gray-200 hx:bg-white hx:text-gray-100 hx:dark:border-neutral-800 hx:dark:bg-neutral-900 hx:absolute hx:top-full hx:z-20 hx:mt-2 hx:overflow-auto hx:overscroll-contain hx:rounded-xl hx:py-2.5 hx:shadow-xl hx:max-h-[min(calc(50vh-11rem-env(safe-area-inset-bottom)),400px)] hx:md:max-h-[min(calc(100vh-5rem-env(safe-area-inset-bottom)),400px)] hx:inset-x-0 hx:ltr:md:left-auto hx:rtl:md:right-auto hx:contrast-more:border hx:contrast-more:border-gray-900 hx:contrast-more:dark:border-gray-50 hx:w-screen hx:min-h-[100px] hx:max-w-[min(calc(100vw-2rem),calc(100%+20rem))]"
aria-label="搜索结果"
style="transition: max-height 0.2s ease 0s;"
></ul>
<div class="hextra-search-status hx:sr-only" aria-live="polite" role="status"></div>
</div>
</div>
</div><div class="hextra-scrollbar hx:overflow-y-auto hx:overflow-x-hidden hx:p-4 hx:grow hx:md:h-[calc(100vh-var(--navbar-height)-var(--menu-height))]">
<ul class="hx:flex hx:flex-col hx:gap-1 hx:md:hidden">
<li class="open"><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:ltr:pr-8 hx:rtl:pl-8 hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/"
>
<span class="hx:min-w-0 [word-break:break-word]">Posts</span>
</a>
<button type="button" class="hextra-sidebar-collapsible-button hx:absolute hx:top-1/2 hx:-translate-y-1/2 hx:ltr:right-2 hx:rtl:left-2 hx:shrink-0 hx:cursor-pointer hx:p-0 hx:text-gray-500 hx:dark:text-neutral-400 hx:group-hover:text-gray-900 hx:dark:group-hover:text-gray-50 hx:group-data-[active=true]:text-primary-800 hx:group-data-[active=true]:dark:text-primary-600 hx:hextra-focus-visible-inset" aria-label="切换章节" aria-expanded="true"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" focusable="false" class="hx:h-[18px] hx:min-w-[18px] hx:rounded-xs hx:p-0.5 hx:hover:bg-gray-800/5 hx:dark:hover:bg-gray-100/5"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" class="hx:origin-center hx:transition-transform hx:rtl:-rotate-180"></path></svg></button>
</div><div class="hextra-sidebar-children hx:ltr:pr-0 hx:rtl:pl-0 hx:overflow-hidden">
<ul class='hx:relative hx:flex hx:flex-col hx:gap-1 hx:before:absolute hx:before:inset-y-1 hx:before:w-px hx:before:bg-gray-200 hx:before:content-[""] hx:ltr:ml-3 hx:ltr:pl-3 hx:ltr:before:left-0 hx:rtl:mr-3 hx:rtl:pr-3 hx:rtl:before:right-0 hx:dark:before:bg-neutral-800'><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/231225-dockernote/"
>
<span class="hx:min-w-0 [word-break:break-word]">docker简单笔记</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/231127-vncserver/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux安装VNC服务端</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/230908-py-post/"
>
<span class="hx:min-w-0 [word-break:break-word]">Python socket 收取POST协议内容时没有payload</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col open"><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="true">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hextra-sidebar-active-item hx:bg-primary-100 hx:font-semibold hx:text-primary-800 hx:contrast-more:border hx:contrast-more:border-primary-500 hx:dark:bg-primary-400/10 hx:dark:text-primary-600 hx:contrast-more:dark:border-primary-500"
href="/posts/230508-remake-deb/"
>
<span class="hx:min-w-0 [word-break:break-word]">讨论在Debian系操作系统中重新提取已安装的软件并重新打包</span>
</a>
</div>
<ul class='hx:flex hx:flex-col hx:gap-1 hx:relative hx:before:absolute hx:before:inset-y-1 hx:before:w-px hx:before:bg-gray-200 hx:before:content-[""] hx:dark:before:bg-neutral-800 hx:ltr:pl-3 hx:ltr:before:left-0 hx:rtl:pr-3 hx:rtl:before:right-0 hx:ltr:ml-3 hx:rtl:mr-3'><li>
<a
href="#%e6%96%87%e4%bb%b6%e7%9a%84%e4%bf%9d%e5%ad%98%e5%9c%b0%e7%82%b9"
class="hx:flex hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [word-break:break-word] hx:cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:contrast-more:border hx:gap-2 hx:before:opacity-25 hx:before:content-['#'] hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:text-gray-900 hx:contrast-more:dark:text-gray-50 hx:contrast-more:border-transparent hx:contrast-more:hover:border-gray-900 hx:contrast-more:dark:hover:border-gray-50"
>文件的保存地点</a>
</li>
<li>
<a
href="#%e6%b5%81%e7%a8%8b%e8%ae%be%e6%83%b3"
class="hx:flex hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [word-break:break-word] hx:cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:contrast-more:border hx:gap-2 hx:before:opacity-25 hx:before:content-['#'] hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:text-gray-900 hx:contrast-more:dark:text-gray-50 hx:contrast-more:border-transparent hx:contrast-more:hover:border-gray-900 hx:contrast-more:dark:hover:border-gray-50"
>流程设想</a>
</li>
<li>
<a
href="#%e5%b1%80%e9%99%90%e6%80%a7"
class="hx:flex hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [word-break:break-word] hx:cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:contrast-more:border hx:gap-2 hx:before:opacity-25 hx:before:content-['#'] hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:text-gray-900 hx:contrast-more:dark:text-gray-50 hx:contrast-more:border-transparent hx:contrast-more:hover:border-gray-900 hx:contrast-more:dark:hover:border-gray-50"
>局限性</a>
</li>
</ul>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/220714-unpackclonezillaimage/"
>
<span class="hx:min-w-0 [word-break:break-word]">从再生龙(clonezilla)镜像直接提取文件</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/220223-deepin_partsinddefilemanager/"
>
<span class="hx:min-w-0 [word-break:break-word]">Deepin/UOS文件管理器隐藏不需要的盘符</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/220104-diylinuxiso/"
>
<span class="hx:min-w-0 [word-break:break-word]">定制自己的Linux ISO镜像</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/211203-linuxchangeusername/"
>
<span class="hx:min-w-0 [word-break:break-word]">在Linux环境下修改用户名和主目录</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/211115-fixnasdriver/"
>
<span class="hx:min-w-0 [word-break:break-word]">记一次拯救NAS硬盘</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/211019-dpkg_package_guide/"
>
<span class="hx:min-w-0 [word-break:break-word]">DEB打包方法简介</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210928-rpm_package/"
>
<span class="hx:min-w-0 [word-break:break-word]">RPM安装包制作方法</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210914-mdadm/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux恢复操作系统后mdadm导致开机变慢的方法</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210914-linuxbackupdd/"
>
<span class="hx:min-w-0 [word-break:break-word]">使用dd指令备份和恢复Linux系统(硬盘级)</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210824-linuxtouchscreenfin/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux处理多触屏的终极解决方案</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210719-gpuinfoinlinux/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux中获得AMD显卡的状态信息</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210630-sudowithoutpasswd/"
>
<span class="hx:min-w-0 [word-break:break-word]">免密码使用sudo</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210429-deepinautorun/"
>
<span class="hx:min-w-0 [word-break:break-word]">deepin和UOS,快捷方式,开机自启动</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210420-linuxmorethan4serialport/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux启用四个以上的串口</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210328-linuxchangemacip/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux修改mac地址</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/about_hugo_website/"
>
<span class="hx:min-w-0 [word-break:break-word]">关于使用HUGO建立博客站点</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210311-serialmodeandudevinlinux/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux串口和udev理解</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210311-multitouchscreeninlinux/"
>
<span class="hx:min-w-0 [word-break:break-word]">Linux多显示器触屏调试与暂行解决方案</span>
</a>
</div>
</li><li class="hx:flex hx:flex-col "><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/posts/210218-teamspeakwithdocker/"
>
<span class="hx:min-w-0 [word-break:break-word]">使用Docker安装TeamSpeak</span>
</a>
</div>
</li></ul>
</div></li>
<li class=""><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/about-card/"
>
<span class="hx:min-w-0 [word-break:break-word]">Kushidou</span>
</a>
</div></li>
<li class=""><div class="hextra-sidebar-item hx:group hx:relative hx:flex hx:items-center" data-active="false">
<a
class="hx:flex hx:items-center hx:justify-between hx:gap-2 hx:grow hx:cursor-pointer hx:rounded-sm hx:px-2 hx:py-1.5 hx:text-sm hx:transition-colors [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] hx:hextra-focus-visible-inset hx:text-gray-500 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:contrast-more:border hx:contrast-more:border-transparent hx:contrast-more:text-gray-900 hx:contrast-more:hover:border-gray-900 hx:dark:text-neutral-400 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:contrast-more:dark:text-gray-50 hx:contrast-more:dark:hover:border-gray-50"
href="/about/"
>
<span class="hx:min-w-0 [word-break:break-word]">关于我</span>
</a>
</div></li>
</ul>
<div class="hx:max-xl:hidden hx:h-0 hx:w-64 hx:shrink-0"></div></div>
<div class="hx:md:hidden hx:sticky hx:bottom-0 hx:max-h-(--menu-height) hx:bg-white hx:dark:bg-dark hx:mx-4 hx:py-4 hx:shadow-[0_-12px_16px_#fff] hx:flex hx:items-center hx:gap-2 hx:border-gray-200 hx:dark:border-neutral-800 hx:dark:shadow-[0_-12px_16px_#111] hx:contrast-more:border-neutral-400 hx:contrast-more:shadow-none hx:contrast-more:dark:shadow-none hx:border-t" data-toggle-animation="show"><div class="hx:flex hx:grow hx:flex-col"><div class="hx:flex hx:justify-items-start hx:group" data-theme="light">
<button
title="切换主题"
data-state="closed"
data-location="bottom"
class="hextra-theme-toggle hx:cursor-pointer hx:rounded-md hx:text-left hx:font-medium hx:h-7 hx:px-2 hx:text-xs hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:hover:bg-primary-100/5 hx:dark:hover:text-gray-50 hx:font-medium hx:text-gray-600 hx:transition-colors hx:dark:text-gray-400 hx:grow"
type="button"
aria-label="切换主题"
aria-expanded="false"
aria-haspopup="menu"
>
<div class="hx:flex hx:items-center hx:gap-2 hx:capitalize"><svg height=12 class="hx:group-data-[theme=dark]:hidden hx:group-data-[theme=system]:hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"/></svg><span class="hx:group-data-[theme=dark]:hidden hx:group-data-[theme=system]:hidden">浅色</span><svg height=12 class="hx:group-data-[theme=light]:hidden hx:group-data-[theme=system]:hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"/></svg><span class="hx:group-data-[theme=light]:hidden hx:group-data-[theme=system]:hidden">深色</span><svg height=12 class="hx:group-data-[theme=dark]:hidden hx:group-data-[theme=light]:hidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M 11.996094,2 C 6.4986225,2.0192368 2.03125,6.5024993 2.03125,12 c 0,5.497501 4.4673725,9.980763 9.964844,10 H 12 12.0039 c 5.497471,-0.01924 9.964844,-4.502499 9.964844,-10 0,-5.4975007 -4.467373,-9.9807632 -9.964844,-10 H 12 Z M 12,4 c 4.417218,0.017598 7.96875,3.5822356 7.96875,8 0,4.417764 -3.551532,7.982402 -7.96875,8 z" />
</svg>
<span class="hx:group-data-[theme=dark]:hidden hx:group-data-[theme=light]:hidden">跟随系统</span></div>
</button>
<ul
class="hextra-theme-toggle-options hx:hidden hx:z-20 hx:max-h-64 hx:overflow-auto hx:rounded-lg hx:border hx:border-gray-200 hx:bg-white hx:p-1 hx:text-sm hx:shadow-lg hx:dark:border-neutral-700 hx:dark:bg-neutral-900"
style="position: fixed; inset: auto auto 0px 0px; margin: 0px; min-width: 100px;"
data-theme="light"
role="menu"
>
<li role="none" class="hx:flex hx:flex-col">
<button
type="button"
role="menuitemradio"
aria-checked="true"
tabindex="-1"
data-item="light"
class="hx:text-gray-700 hx:dark:text-gray-300 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:hover:bg-neutral-800 hx:dark:hover:text-gray-100 hx:relative hx:cursor-pointer hx:whitespace-nowrap hx:rounded-sm hx:py-1.5 hx:transition-colors hx:ltr:pl-3 hx:ltr:pr-9 hx:rtl:pr-3 hx:rtl:pl-9 hx:text-left hx:w-full hx:bg-transparent hx:border-0"
>
浅色
<span class="hx:absolute hx:inset-y-0 hx:flex hx:items-center hx:ltr:right-3 hx:rtl:left-3 hx:group-data-[theme=dark]:hidden hx:group-data-[theme=system]:hidden"><svg height=1em width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>
</button>
</li>
<li role="none" class="hx:flex hx:flex-col">
<button
type="button"
role="menuitemradio"
aria-checked="false"
tabindex="-1"
data-item="dark"
class="hx:text-gray-700 hx:dark:text-gray-300 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:hover:bg-neutral-800 hx:dark:hover:text-gray-100 hx:relative hx:cursor-pointer hx:whitespace-nowrap hx:rounded-sm hx:py-1.5 hx:transition-colors hx:ltr:pl-3 hx:ltr:pr-9 hx:rtl:pr-3 hx:rtl:pl-9 hx:text-left hx:w-full hx:bg-transparent hx:border-0"
>
深色
<span class="hx:absolute hx:inset-y-0 hx:flex hx:items-center hx:ltr:right-3 hx:rtl:left-3 hx:group-data-[theme=light]:hidden hx:group-data-[theme=system]:hidden"><svg height=1em width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>
</button>
</li>
<li role="none" class="hx:flex hx:flex-col">
<button
type="button"
role="menuitemradio"
aria-checked="false"
tabindex="-1"
data-item="system"
class="hx:text-gray-700 hx:dark:text-gray-300 hx:hover:bg-gray-100 hx:hover:text-gray-900 hx:dark:hover:bg-neutral-800 hx:dark:hover:text-gray-100 hx:relative hx:cursor-pointer hx:whitespace-nowrap hx:rounded-sm hx:py-1.5 hx:transition-colors hx:ltr:pl-3 hx:ltr:pr-9 hx:rtl:pr-3 hx:rtl:pl-9 hx:text-left hx:w-full hx:bg-transparent hx:border-0"
>
跟随系统
<span class="hx:absolute hx:inset-y-0 hx:flex hx:items-center hx:ltr:right-3 hx:rtl:left-3 hx:group-data-[theme=dark]:hidden hx:group-data-[theme=light]:hidden"><svg height=1em width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>
</button>
</li>
</ul>
</div>
</div></div></aside>
<nav class="hextra-toc hx:order-last hx:hidden hx:w-64 hx:shrink-0 hx:xl:block hx:print:hidden hx:px-4" aria-label="目录">
<div class="hextra-scrollbar hx:sticky hx:top-[var(--hextra-navbar-height)] hx:overflow-y-auto hx:pr-4 hx:pt-6 hx:text-sm [hyphens:auto] hx:max-h-[calc(100vh-var(--hextra-navbar-height)-env(safe-area-inset-bottom))] hx:ltr:-mr-4 hx:rtl:-ml-4"><p class="hx:mb-4 hx:font-semibold hx:tracking-tight">目录</p><ul>
<li class="hx:my-2 hx:scroll-my-6 hx:scroll-py-6">
<a class="hx:font-medium hx:inline-block hx:rounded-sm hx:text-gray-500 hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-300 hx:contrast-more:text-gray-900 hx:contrast-more:underline hx:contrast-more:dark:text-gray-50 hx:w-full hx:wrap-break-word hx:hextra-focus-visible-inset" href="#%e6%96%87%e4%bb%b6%e7%9a%84%e4%bf%9d%e5%ad%98%e5%9c%b0%e7%82%b9">文件的保存地点
</a>
</li>
<li class="hx:my-2 hx:scroll-my-6 hx:scroll-py-6">
<a class="hx:font-medium hx:inline-block hx:rounded-sm hx:text-gray-500 hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-300 hx:contrast-more:text-gray-900 hx:contrast-more:underline hx:contrast-more:dark:text-gray-50 hx:w-full hx:wrap-break-word hx:hextra-focus-visible-inset" href="#%e6%b5%81%e7%a8%8b%e8%ae%be%e6%83%b3">流程设想
</a>
</li>
<li class="hx:my-2 hx:scroll-my-6 hx:scroll-py-6">
<a class="hx:font-medium hx:inline-block hx:rounded-sm hx:text-gray-500 hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-300 hx:contrast-more:text-gray-900 hx:contrast-more:underline hx:contrast-more:dark:text-gray-50 hx:w-full hx:wrap-break-word hx:hextra-focus-visible-inset" href="#%e5%b1%80%e9%99%90%e6%80%a7">局限性
</a>
</li></ul>
<div class="hx:mt-8 hx:border-t hx:bg-white hx:pt-8 hx:shadow-[0_-12px_16px_white] hx:dark:bg-dark hx:dark:shadow-[0_-12px_16px_#111] hx:sticky hx:bottom-0 hx:flex hx:flex-col hx:items-start hx:gap-3 hx:pb-8 hx:border-gray-200 hx:dark:border-neutral-800 hx:contrast-more:border-t hx:contrast-more:border-neutral-400 hx:contrast-more:shadow-none hx:contrast-more:dark:border-neutral-400">
<div class="hx:text-xs hx:w-full">
<div class="hx:font-semibold hx:text-gray-700 hx:dark:text-gray-300 hx:mb-1.5">标签</div>
<div class="hx:flex hx:flex-wrap hx:gap-1.5"><a href="/tags/linux/" class="hx:inline-block hx:px-2 hx:py-0.5 hx:rounded hx:bg-gray-100 hx:text-gray-600 hx:dark:bg-neutral-800 hx:dark:text-gray-400 hx:text-xs hx:hover:bg-gray-200 hx:dark:hover:bg-neutral-700 hx:transition-colors">linux</a><a href="/tags/deepin/" class="hx:inline-block hx:px-2 hx:py-0.5 hx:rounded hx:bg-gray-100 hx:text-gray-600 hx:dark:bg-neutral-800 hx:dark:text-gray-400 hx:text-xs hx:hover:bg-gray-200 hx:dark:hover:bg-neutral-700 hx:transition-colors">deepin</a></div>
</div>
<button id="backToTop" tabindex="-1" class="hx:cursor-pointer hx:transition-all hx:duration-75 hx:opacity-0 hx:text-xs hx:font-medium hx:text-gray-500 hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-100 hx:contrast-more:text-gray-800 hx:contrast-more:dark:text-gray-50">
<span>返回顶部</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" focusable="false" class="hx:inline hx:ltr:ml-1 hx:rtl:mr-1 hx:h-3.5 hx:w-3.5 hx:rounded-full hx:border hx:border-gray-500 hx:hover:border-gray-900 hx:dark:border-gray-400 hx:dark:hover:border-gray-100 hx:contrast-more:border-gray-800 hx:contrast-more:dark:border-gray-50">
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 15.75l7.5-7.5 7.5 7.5" />
</svg>
</button>
</div>
</div>
</nav>
<article class="hx:w-full hx:break-words hx:flex hx:min-h-[calc(100vh-var(--hextra-navbar-height))] hx:min-w-0 hx:justify-center hx:pb-8 hx:pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main id="content" class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-4 hx:md:px-12">
<div class="hx:mt-1.5 hx:flex hx:items-center hx:gap-1 hx:overflow-hidden hx:text-sm hx:text-gray-500 hx:dark:text-gray-400 hx:contrast-more:text-current">
<div class="hx:whitespace-nowrap hx:transition-colors hx:min-w-[24px] hx:overflow-hidden hx:text-ellipsis hx:hover:text-gray-900 hx:dark:hover:text-gray-100">
<a href="/posts/" class="hx:inline-block hx:rounded-sm hx:hextra-focus-visible-inset">Posts</a>
</div><svg class="hx:w-3.5 hx:shrink-0 hx:rtl:-rotate-180" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg><div class="hx:whitespace-nowrap hx:transition-colors hx:font-medium hx:text-gray-700 hx:contrast-more:font-bold hx:contrast-more:text-current hx:dark:text-gray-100 hx:contrast-more:dark:text-current">讨论在Debian系操作系统中重新提取已安装的软件并重新打包</div>
</div>
<div class="hx:flex hx:flex-col hx:sm:flex-row hx:items-start hx:sm:items-center hx:sm:justify-between hx:gap-4 hx:mt-2">
<h1 class="hx:mb-0 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100">讨论在Debian系操作系统中重新提取已安装的软件并重新打包</h1>
</div>
<div class="hx:mt-4 hx:mb-16 hx:text-gray-500 hx:dark:text-gray-400 hx:text-sm hx:flex hx:items-center hx:flex-wrap hx:gap-y-2"><span class="hx:mr-1">2023/05/08</span><span class="hx:mx-1">·</span><a href="/about" class="hx:mx-1 hx:hover:underline">Kushidou</a></div>
<div class="content">
<p>Debian系操作系统采用dpkg作为包管理器,在安装软件后会存储deb包信息,是否可以提取这些信息并且重新打deb包转移到其他平台使用?</p>
<p>之前有一个需求,要从UOS里面提取一个软件,并且将其安装到另一台设备中。当时找了一圈都没有找到相关的提取教程。但是从逻辑上来讲,dpkg安装的软件会保存deb包的相关信息,所以理论上讲是可以提取出软件包的所有内容,然后我们重新打包的。</p>
<p>今天在一个机缘巧合下(其实是懒得研究dpkg原理,瞎猫撞上死耗子),发现了dpkg保存文件信息的地点,于是接下来可以展开畅想:提取已经安装的软件并重新打包。</p>
<h2>文件的保存地点<span class="hx:absolute hx:-mt-20" id="文件的保存地点"></span>
<a href="#%e6%96%87%e4%bb%b6%e7%9a%84%e4%bf%9d%e5%ad%98%e5%9c%b0%e7%82%b9" class="subheading-anchor" aria-label="此章节的永久链接"></a></h2><p>我在找fcitx有关的配置文件进行全盘搜索的时候,找到了一条目录<code>/usr/lib/dpkg-db/info</code>,这个目录里面保留了fcitx的&quot;conffiles&quot;, &ldquo;md5sums&rdquo;, &ldquo;postinst&rdquo;, &ldquo;prerm&quot;四个文件,以及一个list文件。恰好fcitx.deb解包出来的DEBIAN文件夹内也是这四个文件加上额外的control文件,。</p>
<p>那么合理猜测,dpkg安装软件的时候,不仅把软件本身的文件移动到对应位置,还把DEBIAN里面的信息和脚本也转移到<code>/usr/lib/dpkg-db/</code>里面保存了。</p>
<p><code>fcitx.list</code>文件中记录的是所有的文件及其路径。想必这里面就是全部的文件了。</p>
<p>至于control文件,则都被保存到了<code>/usr/lib/dpkg-db/status</code>这个文本文件中。</p>
<h2>流程设想<span class="hx:absolute hx:-mt-20" id="流程设想"></span>
<a href="#%e6%b5%81%e7%a8%8b%e8%ae%be%e6%83%b3" class="subheading-anchor" aria-label="此章节的永久链接"></a></h2><p>既然deb包所有必要的文件都找到了,那么就可以尝试一下还原过程了。在<a href="https://www.small09.top/posts/211019-dpkg_package_guide/"target="_blank" rel="noopener">这篇文章</a>里我研究过deb包的组成、格式和打包方法。</p>
<p>比如对于软件包A</p>
<ol>
<li>
<p>创建一个工作目录,并在其中新建<code>DEBIAN</code>目录。</p>
</li>
<li>
<p><code>/usr/lib/dpkg-db/info</code>中所有该软件的脚本和信息(除了A.list)转移到<code>DEBIAN</code>中,并重命名成规范名称。</p>
</li>
<li>
<p><code>/usr/lib/dpkg-db/status</code>中与软件A有关的部分提取出来,保存到<code>DEBIAN/control</code>文件中。</p>
</li>
<li>
<p>根据A.list文件,找到软件包含的所有文件,将其按原样整理到工作目录内。</p>
</li>
<li>
<p>使用<code>dpkg -b</code>指令重新打包。</p>
</li>
</ol>
<h2>局限性<span class="hx:absolute hx:-mt-20" id="局限性"></span>
<a href="#%e5%b1%80%e9%99%90%e6%80%a7" class="subheading-anchor" aria-label="此章节的永久链接"></a></h2><p>以上毕竟只是设想,没有进行试验,所以估计会出现这些问题,希望有需要的人尝试后可以解决。</p>
<ul>
<li>
<p>提取信息的难度: 由于<code>/usr/lib/dpkg-db/status</code>文件是一个包含几乎所有deb信息的文本文件,体积大内容乱,对于自动化脚本来说有些难度。加上一些软件的衍生品会在软件名上直接加后缀,对于提取的脚本来讲可能造成混淆,提取出不必要的东西。</p>
</li>
<li>
<p>获取源文件的难度: 不排除一些软件安装时会删除、修改自身的一些文件,可能打包会后会缺失内容。一些软件安装过程中会进行手动配置从而造成内容改变,重做出来的软件包不一定完整。</p>
</li>
<li>
<p>签名问题: 我们打包的软件没有原作者的数字签名,可能无法安装,也可能时候安装官方软件时冲突。</p>
</li>
<li>
<p>这个方案只能处理普通的软件,一些deb打包源码,安装时进行编译的,应该是不能用这种方案复原的。(apt的deb-src源)</p>
</li>
</ul>
<p>最后,希望有大佬可以验证一下这个方案。</p>
</div>
<div class="hx:mt-12 hx:mb-8 hx:block hx:text-xs hx:text-gray-500 hx:ltr:text-right hx:rtl:text-left hx:dark:text-gray-400">
最后更新于 <time datetime="2023-05-08T14:43:41.000Z">2023/05/08</time></div><div class="hx:mb-8 hx:flex hx:items-center hx:border-t hx:pt-8 hx:border-gray-200 hx:dark:border-neutral-800 hx:contrast-more:border-neutral-400 hx:dark:contrast-more:border-neutral-400 hx:print:hidden"><a
href="/posts/220714-unpackclonezillaimage/"
title="从再生龙(clonezilla)镜像直接提取文件"
class="hx:flex hx:max-w-[50%] hx:items-center hx:gap-1 hx:py-4 hx:text-base hx:font-medium hx:text-gray-600 hx:transition-colors [word-break:break-word] hx:hover:text-primary-600 hx:dark:text-gray-300 hx:md:text-lg hx:ltr:pr-4 hx:rtl:pl-4"
><svg class="hx:inline hx:h-5 hx:shrink-0 hx:ltr:rotate-180" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>从再生龙(clonezilla)镜像直接提取文件</a><a
href="/posts/230908-py-post/"
title="Python socket 收取POST协议内容时没有payload"
class="hx:flex hx:max-w-[50%] hx:items-center hx:gap-1 hx:py-4 hx:text-base hx:font-medium hx:text-gray-600 hx:transition-colors [word-break:break-word] hx:hover:text-primary-600 hx:dark:text-gray-300 hx:md:text-lg hx:ltr:ml-auto hx:ltr:pl-4 hx:ltr:text-right hx:rtl:mr-auto hx:rtl:pr-4 hx:rtl:text-left"
>Python socket 收取POST协议内容时没有payload<svg class="hx:inline hx:h-5 hx:shrink-0 hx:rtl:-rotate-180" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg></a></div>
<div id="remark42"></div>
<script>
var remark42_config = {
host: 'https:\/\/www.small09.top\/comment',
site_id: 'blog',
max_shown_comments: 15,
theme: 'light',
page_title: '讨论在Debian系操作系统中重新提取已安装的软件并重新打包',
locale: 'en',
};
</script>
<script src="https://www.small09.top/comment/web/embed.js"></script>
<script>
(function () {
function getRemark42Theme() {
var stored = localStorage.getItem('color-theme');
if (stored === 'light' || stored === 'dark') return stored;
if (stored === 'system') {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
var defaultTheme = '';
if (defaultTheme === 'light' || defaultTheme === 'dark') return defaultTheme;
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
function setRemark42Theme() {
var frame = document.querySelector('iframe#remark42-frame');
if (frame && frame.contentWindow) {
frame.contentWindow.postMessage(
{ theme: getRemark42Theme() },
remark42_config.host
);
}
}
remark42_config.theme = getRemark42Theme();
window.addEventListener('message', function (e) {
if (e.data && e.data.remark42) {
setRemark42Theme();
}
});
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', setRemark42Theme);
var toggles = document.querySelectorAll('.hextra-theme-toggle-options [data-item]');
if (toggles) {
toggles.forEach(function (toggle) {
toggle.addEventListener('click', function () {
setTimeout(setRemark42Theme, 200);
});
});
}
})();
</script>
</main>
</article>
</div>
<footer class="hextra-footer hx:bg-gray-100 hx:pb-[env(safe-area-inset-bottom)] hx:dark:bg-neutral-900 hx:print:bg-transparent">
<div class="hextra-max-footer-width hx:mx-auto hx:flex hx:justify-center hx:text-gray-500 hx:dark:text-gray-400 hx:text-xs" style="padding:24px 16px">
<div style="text-align:center;line-height:1.8">
<div>
2021-2026 © Kushidou ·
Powered by <a href="https://github.com/imfing/hextra" target="_blank" rel="noreferrer" style="text-decoration:none" class="hx:hover:text-gray-700 hx:dark:hover:text-gray-200">Hextra</a> and
<a href="https://gohugo.io/" target="_blank" rel="noreferrer" style="text-decoration:none" class="hx:hover:text-gray-700 hx:dark:hover:text-gray-200">Hugo</a>
</div>
<div>
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noreferrer" style="text-decoration:none" class="hx:hover:text-gray-700 hx:dark:hover:text-gray-200">苏ICP备2021006778号</a>
&emsp;&emsp;
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=32040502000157" target="_blank" rel="noreferrer" style="text-decoration:none" class="hx:hover:text-gray-700 hx:dark:hover:text-gray-200">苏公网安备 32040502000157号</a>
</div>
</div>
</div>
</footer>
<script defer src="/js/main.min.d9fbefbbac8caeb66025dbb14d569c30defac0effcba45486a78209fba9360af.js" integrity="sha256-2fvvu6yMrrZgJduxTVacMN76wO/8ukVIanggn7qTYK8="></script>
<script defer src="/js/flexsearch.433e941a8a573ebb9931fc16fc75266ab6b93f569ac2fb4f3dc66882e0416f4c.js" integrity="sha256-Qz6UGopXPruZMfwW/HUmara5P1aawvtPPcZoguBBb0w=" crossorigin="anonymous"></script><script defer src="/en.search.min.2cc417b6975b6621e049223d9f505ea2e6bd026e4cae8052a858eafc78cf230e.js" integrity="sha256-LMQXtpdbZiHgSSI9n1Beoua9Am5MroBSqFjq/HjPIw4="></script>
</body>
</html>