Go to file
Dominik Csapak e4974b9891 fix #3618: proxmox-async: zip: add conditional EFS flag to zip files
this flag marks the file names as 'UTF-8' encoded if they are valid UTF-8.

By default, encoding of file names in zips are defined as code page 437,
but we save the filenames as bytes (like in linux fs).

For linux systems this would not be a problem since most tools
simply use the filenames as bytes, but for the zip utility under
windows it's important since NTFS uses UTF-16 for file names.

For filenames that are valid UTF-8, they are decoded as UTF-8 everywhere
correctly (Linux as UTF-8 bytes, Windows as correct UTF-16 sequence) and
for other filenames with a high bit set, it depends on the OS/Software
what exactly happens. Some cases below:

* Windows + Built-in/7zip: decoded as CP437
* Debian + zip: Bytes taken as-is
* Debian + 7z: interpreted as Windows1252, decoded as UTF-8

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-11 06:31:58 +01:00
.cargo cargo: switch to use packaged crates by default 2020-01-03 09:39:52 +01:00
proxmox-api-macro api-macro: formatting 2021-12-07 11:51:09 +01:00
proxmox-async fix #3618: proxmox-async: zip: add conditional EFS flag to zip files 2022-01-11 06:31:58 +01:00
proxmox-borrow bump proxmox-borrow to 1.0.1-1 2021-10-13 10:41:01 +02:00
proxmox-http http: clippy fixes 2021-12-07 11:45:52 +01:00
proxmox-io io: formatting 2021-12-07 11:51:15 +01:00
proxmox-lang clipy fixes 2021-11-22 09:07:29 +01:00
proxmox-router switch to new schema verify methods 2021-12-30 11:51:08 +01:00
proxmox-schema schema: fix deprecation warnings in tests 2021-12-17 08:07:02 +01:00
proxmox-section-config switch to new schema verify methods 2021-12-30 11:51:08 +01:00
proxmox-serde proxmox-serde: track d/control 2021-12-30 11:51:08 +01:00
proxmox-shared-memory shared-memory: track d/control 2021-12-30 11:51:08 +01:00
proxmox-sortable-macro clippy: misc fixes 2021-12-02 09:00:52 +01:00
proxmox-sys sys: make xattr tests integration tests 2021-12-30 11:51:08 +01:00
proxmox-tfa tfa: ignore uncompilable doctest 2021-12-30 11:51:08 +01:00
proxmox-time time: fix tests 2021-12-17 08:04:12 +01:00
proxmox-uuid uuid: clippy fixes 2021-12-07 11:50:27 +01:00
.gitignore ignore member crate target dirs as well 2021-02-03 11:18:34 +01:00
build.sh build: track d/control in git 2020-11-30 15:13:01 +01:00
Cargo.toml remove proxmox crate (no longer used) 2021-11-24 10:00:38 +01:00
Makefile remove proxmox crate (no longer used) 2021-11-24 10:00:38 +01:00
README.rst start checklist for adding crates in README.rst 2021-10-06 10:37:17 +02:00
rustfmt.toml initial import, starting with vec & io helpers 2019-06-06 14:00:25 +02:00

Local cargo config
==================

This repository ships with a ``.cargo/config`` that replaces the crates.io
registry with packaged crates located in ``/usr/share/cargo/registry``.

A similar config is also applied building with dh_cargo. Cargo.lock needs to be
deleted when switching between packaged crates and crates.io, since the
checksums are not compatible.

To reference new dependencies (or updated versions) that are not yet packaged,
the dependency needs to point directly to a path or git source.

Steps for Releases
==================

- Cargo.toml updates:
  - Bump all modified crate versions.
  - Update all the other crates' Cargo.toml to depend on the new versions if
    required, then bump their version as well if not already done.
- Update debian/changelog files in all the crates updated above.
- Build packages with `make deb`.

Adding Crates
=============

1) At the top level:
  - Generate the crate: ``cargo new --lib the-name``
  - Sort the crate into ``Cargo.toml``'s ``workspace.members``
  - Sort the crate into the ``Makefile``'s ``CRATES`` list.

2) In the new crate's ``Cargo.toml``:
  - Replace the ``author`` line with
    ``authors = ["Proxmox Support Team <support@proxmox.com>"]``
  - Add ``license = "AGPL-3"``
  - Add ``exclude = [ "debian" ]``
  - Add a meaningful ``description``
  - Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate.