You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: linuxpkg.rs
    path of file: ./repos/skytable/harness/src
    
    the code of the file until where you have to start completion: /*
 * Created on Thu Mar 17 2022
 *
 * This file is a part of Skytable
 * Skytable (formerly known as TerrabaseDB or Skybase) is a free and open-source
 * NoSQL database written by Sayan Nandan ("the Author") with the
 * vision to provide flexibility in data modelling without compromising
 * on performance, queryability or scalability.
 *
 * Copyright (c) 2022, Sayan Nandan <ohsayan@outlook.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
*/

use {
    crate::{
        build::{self, BuildMode},
        {util, HarnessResult},
    
pub fn create_linuxpkg(package_type: LinuxPackageType) -> HarnessResult<()> {
    info!("Building binaries for Linux package");
    let _ = build::build(BuildMode::Release)?;
    info!("Creating Linux package");
    let filename = package_type.get_file_name();
    match package_type {
        LinuxPackageType::Deb => {
            // install cargo-deb
            util::handle_child("install cargo-deb", cmd!("cargo", "install", "cargo-deb"))?;
            // make files executable
            util::handle_child(
                "make maintainer scripts executable",
                cmd!(
                    "chmod",
                    "+x",
                    "pkg/debian/postinst",
                    "pkg/debian/preinst",
                    "pkg/debian/postrm",
                    "pkg/debian/prerm"
                ),
            )?;
            // assemble the command
            let mut build_args = vec!["cargo".into(), "deb".to_owned()];
            if let Some(t) = util::get_var(util::VAR_TARGET) {
                build_args.push("--target".to_string());
                build_args.push(t);
            }
            build_args.extend([
                "--no-build".to_owned(),
                "--manifest-path=server/Cargo.toml".to_owned(),
                "--output".to_owned(),
                filename.to_owned(),
            ]);
            let command = util::assemble_command_from_slice(build_args);
            util::handle_child("build dpkg", command)?;
        }
    }
    info!("Done building Linux package: {filename}");
    Ok(())
}