Skip to content

Commit

Permalink
Merge github.com:nix-rust/nix into evfilt
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Oct 14, 2016
2 parents be9c1ff + bf00bf2 commit 3ccb313
Show file tree
Hide file tree
Showing 18 changed files with 608 additions and 413 deletions.
74 changes: 69 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,42 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added complete definitions for all kqueue-related constants on all supported
OSes
([#415](https://github.com/nix-rust/nix/pull/415))
- Added function `epoll_create1` and bitflags `EpollCreateFlags` in
`::nix::sys::epoll` in order to support `::libc::epoll_create1`.
([#410](https://github.com/nix-rust/nix/pull/410))

### Changed
- Changed `KEvent` to an opaque structure that may only be modified by its
constructor and the `ev_set` method.
([#415](https://github.com/nix-rust/nix/pull/415))
- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated
using `pipe`, which meant that setting `O_CLOEXEC` was not atomic.
([#427](https://github.com/nix-rust/nix/pull/427))
- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for
it to conform with our conventions.
([#410](https://github.com/nix-rust/nix/pull/410))
- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for
`::libc::epoll_event`. The formerly public field `events` is now be read-only
accessible with the new method `events()` of `EpollEvent`. Instances of
`EpollEvent` can be constructed using the new method `new()` of EpollEvent.
([#410](https://github.com/nix-rust/nix/pull/410))

### Fixed
- Fixed using kqueue with `EVFILT_USER` on FreeBSD
([#415](https://github.com/nix-rust/nix/pull/415))
- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg
functions on that same OS.
([#397](https://github.com/nix-rust/nix/pull/397))
- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`.
([#429](https://github.com/nix-rust/nix/pull/429))

## [0.7.0] 2016-09-09

### Added
- Added `lseek` and `lseek64` in `::nix::unistd`
([#377](https://github.com/nix-rust/nix/pull/377))
- Added `mkdir` and `getcwd` in `::nix::unistd`
([#416](https://github.com/nix-rust/nix/pull/416))
- Added accessors `sigmask_mut` and `sigmask` to `UContext` in
`::nix::ucontext`.
([#370](https://github.com/nix-rust/nix/pull/370))
Expand All @@ -20,24 +54,54 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and
functions `reboot` and `set_cad_enabled`. Currently for _linux_ only.
([#386](https://github.com/nix-rust/nix/pull/386))
- `FdSet` in `::nix::sys::select` now also implements `Clone`.
([#405](https://github.com/nix-rust/nix/pull/405))
- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets.
([#407](https://github.com/nix-rust/nix/pull/407))
- Added `CpuSet::unset` in `::nix::sched`.
([#402](https://github.com/nix-rust/nix/pull/402))
- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to
allow creation of objects, after removing public access to members.
([#399](https://github.com/nix-rust/nix/pull/399))
- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide
read access to formerly public member `revents`.
([#399](https://github.com/nix-rust/nix/pull/399))
- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only.
([#422](https://github.com/nix-rust/nix/pull/422))

### Changed
- Changed `KEvent` to an opaque structure that may only be modified by its
constructor and the `ev_set` method.
([#415](https://github.com/nix-rust/nix/pull/415))
- Replaced the reexported integer constants for signals by the enumeration
`Signal` in `::nix::sys::signal`.
([#362](https://github.com/nix-rust/nix/pull/362))
- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`.
([#383](https://github.com/nix-rust/nix/pull/383))
- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in
`::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now
return `EINVAL`, if an invalid argument for the `field` parameter is passed.
([#402](https://github.com/nix-rust/nix/pull/402))
- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`,
which has the same structure as the old `MqAttr`. The field `mq_flags` of
`::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`.
`MqAttr` also no longer implements `Debug`.
([#392](https://github.com/nix-rust/nix/pull/392))
- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue`
was replaced by a parameter named `msg_prio` with type `&mut u32`, so that
the message priority can be obtained by the caller.
([#392](https://github.com/nix-rust/nix/pull/392))
- The type alias `MQd` in `::nix::queue` was replaced by the type alias
`libc::mqd_t`, both of which are aliases for the same type.
([#392](https://github.com/nix-rust/nix/pull/392))

### Removed
- Type alias `SigNum` from `::nix::sys::signal`.
([#362](https://github.com/nix-rust/nix/pull/362))
- Type alias `CpuMask` from `::nix::shed`.
([#402](https://github.com/nix-rust/nix/pull/402))
- Removed public fields from `PollFd` in `::nix::poll`. (See also added method
`revents()`.
([#399](https://github.com/nix-rust/nix/pull/399))

### Fixed
- Fixed using kqueue with `EVFILT_USER` on FreeBSD
([#415](https://github.com/nix-rust/nix/pull/415))
- Fixed the build problem for NetBSD (Note, that we currently do not support
it, so it might already be broken again).
([#389](https://github.com/nix-rust/nix/pull/389))
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name = "nix"
description = "Rust friendly bindings to *nix APIs"
version = "0.6.1-pre"
version = "0.7.1-pre"
authors = ["Carl Lerche <[email protected]>"]
homepage = "https://github.com/nix-rust/nix"
repository = "https://github.com/nix-rust/nix"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To use `nix`, first add this to your `Cargo.toml`:

```toml
[dependencies]
nix = "0.6.0"
nix = "0.7.0"
```

Then, add this to your crate root:
Expand Down
29 changes: 26 additions & 3 deletions RELEASE_PROCEDURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,39 @@ library.

# Before Release

The release is prepared by a commit with the following changes.
Based on changes since the last release, pick a new version number
following semver conventions. For nix, a change that drops support for
some Rust versions counts as a breaking change, and requires a major bump.

- In CHANGELOG.md, rename the Unreleased section to the new version followed by
the date of the release.
The release is prepared as follows:

- Ask for a new libc version if, necessary. It usually is.
- Make a commit with a message like "Release v0.8.3" with the following
changes:
- In `CHANGELOG.md`, rename the Unreleased section to the new version
followed by the date of the release.
- In `Cargo.toml`, update the version to the new version.
- In `Cargo.toml`, change the libc dependency to the latest version.
- In `README.md`, update the version in the Usage section to the new
version.
- Make a pull request.
- Once the PR is merged, tag the merge commit, e.g. `git tag v0.8.3
$MERGE_COMMIT_SHA1`.
- Push the tag, e.g. `git push origin v0.8.3`.

# Create Release

- Checkout the tag.
- Publish to crates.io with `cargo publish`.

# After Release

After the release a commit with the following changes is added to the master
branch.

- Add a new Unreleased section header to CHANGELOG.md.
- In `Cargo.toml`, update the version to the next `-dev` version, e.g.
`v0.8.4-dev`.
- In `Cargo.tml`, revert the libc dependency to its git master branch.
- Commit with a message like "Bump to v0.8.4-dev"
- Make a pull request.
4 changes: 4 additions & 0 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub enum FcntlArg<'a> {
F_ADD_SEALS(SealFlag),
#[cfg(target_os = "linux")]
F_GET_SEALS,
#[cfg(any(target_os = "macos", target_os = "ios"))]
F_FULLFSYNC,

// TODO: Rest of flags
}
Expand All @@ -69,6 +71,8 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
F_ADD_SEALS(flag) => libc::fcntl(fd, ffi::F_ADD_SEALS, flag.bits()),
#[cfg(target_os = "linux")]
F_GET_SEALS => libc::fcntl(fd, ffi::F_GET_SEALS),
#[cfg(any(target_os = "macos", target_os = "ios"))]
F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC),
#[cfg(any(target_os = "linux", target_os = "android"))]
_ => unimplemented!()
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub mod fcntl;
#[cfg(any(target_os = "linux", target_os = "android"))]
pub mod mount;

#[cfg(any(target_os = "linux"))]
#[cfg(target_os = "linux")]
pub mod mqueue;

#[cfg(any(target_os = "linux", target_os = "macos"))]
Expand Down
Loading

0 comments on commit 3ccb313

Please sign in to comment.